38 #include "../include/output_structure.hpp"
45 unsigned short iDim, iZone, iSpan, iMarker;
60 nGlobal_BoundTria = 0;
61 nGlobal_BoundQuad = 0;
66 Conn_Line = NULL; Conn_BoundTria = NULL; Conn_BoundQuad = NULL;
67 Conn_Tria = NULL; Conn_Quad = NULL; Conn_Tetr = NULL;
68 Conn_Hexa = NULL; Conn_Pris = NULL; Conn_Pyra = NULL;
75 nGlobal_Surf_Poin = 0;
86 nParallel_BoundTria = 0;
87 nParallel_BoundQuad = 0;
91 Conn_BoundLine_Par = NULL; Conn_BoundTria_Par = NULL; Conn_BoundQuad_Par = NULL;
92 Conn_Tria_Par = NULL; Conn_Quad_Par = NULL; Conn_Tetr_Par = NULL;
93 Conn_Hexa_Par = NULL; Conn_Pris_Par = NULL; Conn_Pyra_Par = NULL;
96 Local_Data_Copy = NULL;
98 Parallel_Surf_Data = NULL;
102 nGlobalPoint_Sort = 0;
103 nLocalPoint_Sort = 0;
106 Local_Halo_Sort = NULL;
116 nRow_InletFile = NULL;
117 nRowCum_InletFile = NULL;
120 Marker_Tags_InletFile.clear();
124 wrote_base_file =
false;
128 wrote_CGNS_base =
false;
132 wrote_surf_file =
false;
136 wrote_Paraview_base =
false;
142 for (iZone = 0; iZone < config->
GetnZone(); iZone++) RhoRes_Old[iZone] =
EPS;
144 wrote_Paraview_base =
false;
155 TotalStaticEfficiency =
new su2double*[nMarkerTurboPerf];
156 TotalTotalEfficiency =
new su2double*[nMarkerTurboPerf];
157 KineticEnergyLoss =
new su2double*[nMarkerTurboPerf];
158 TRadius =
new su2double*[nMarkerTurboPerf];
159 TotalPressureLoss =
new su2double*[nMarkerTurboPerf];
160 MassFlowIn =
new su2double*[nMarkerTurboPerf];
161 MassFlowOut =
new su2double*[nMarkerTurboPerf];
162 FlowAngleIn =
new su2double*[nMarkerTurboPerf];
163 FlowAngleIn_BC =
new su2double*[nMarkerTurboPerf];
164 FlowAngleOut =
new su2double*[nMarkerTurboPerf];
165 EulerianWork =
new su2double*[nMarkerTurboPerf];
166 TotalEnthalpyIn =
new su2double*[nMarkerTurboPerf];
167 TotalEnthalpyIn_BC =
new su2double*[nMarkerTurboPerf];
168 EntropyIn =
new su2double*[nMarkerTurboPerf];
169 EntropyOut =
new su2double*[nMarkerTurboPerf];
170 EntropyIn_BC =
new su2double*[nMarkerTurboPerf];
171 PressureRatio =
new su2double*[nMarkerTurboPerf];
172 TotalTemperatureIn =
new su2double*[nMarkerTurboPerf];
173 EnthalpyOut =
new su2double*[nMarkerTurboPerf];
174 MachIn =
new su2double**[nMarkerTurboPerf];
175 MachOut =
new su2double**[nMarkerTurboPerf];
176 VelocityOutIs =
new su2double*[nMarkerTurboPerf];
177 DensityIn =
new su2double*[nMarkerTurboPerf];
178 PressureIn =
new su2double*[nMarkerTurboPerf];
179 TurboVelocityIn =
new su2double**[nMarkerTurboPerf];
180 DensityOut =
new su2double*[nMarkerTurboPerf];
181 PressureOut =
new su2double*[nMarkerTurboPerf];
182 TurboVelocityOut =
new su2double**[nMarkerTurboPerf];
183 EnthalpyOutIs =
new su2double*[nMarkerTurboPerf];
184 EntropyGen =
new su2double*[nMarkerTurboPerf];
185 AbsFlowAngleIn =
new su2double*[nMarkerTurboPerf];
186 TotalEnthalpyOut =
new su2double*[nMarkerTurboPerf];
187 TotalEnthalpyOutIs =
new su2double*[nMarkerTurboPerf];
188 RothalpyIn =
new su2double*[nMarkerTurboPerf];
189 RothalpyOut =
new su2double*[nMarkerTurboPerf];
190 AbsFlowAngleOut =
new su2double*[nMarkerTurboPerf];
191 PressureOut_BC =
new su2double*[nMarkerTurboPerf];
192 TemperatureIn =
new su2double*[nMarkerTurboPerf];
193 TemperatureOut =
new su2double*[nMarkerTurboPerf];
194 TotalPressureIn =
new su2double*[nMarkerTurboPerf];
195 TotalPressureOut =
new su2double*[nMarkerTurboPerf];
196 TotalTemperatureOut =
new su2double*[nMarkerTurboPerf];
197 EnthalpyIn =
new su2double*[nMarkerTurboPerf];
198 TurbIntensityIn =
new su2double*[nMarkerTurboPerf];
199 Turb2LamViscRatioIn =
new su2double*[nMarkerTurboPerf];
200 TurbIntensityOut =
new su2double*[nMarkerTurboPerf];
201 Turb2LamViscRatioOut =
new su2double*[nMarkerTurboPerf];
202 NuFactorIn =
new su2double*[nMarkerTurboPerf];
203 NuFactorOut =
new su2double*[nMarkerTurboPerf];
205 for (iMarker = 0; iMarker < nMarkerTurboPerf; iMarker++){
206 TotalStaticEfficiency [iMarker] =
new su2double [nSpanWiseSections + 1];
207 TotalTotalEfficiency [iMarker] =
new su2double [nSpanWiseSections + 1];
208 KineticEnergyLoss [iMarker] =
new su2double [nSpanWiseSections + 1];
209 TRadius [iMarker] =
new su2double [nSpanWiseSections + 1];
210 TotalPressureLoss [iMarker] =
new su2double [nSpanWiseSections + 1];
211 MassFlowIn [iMarker] =
new su2double [nSpanWiseSections + 1];
212 MassFlowOut [iMarker] =
new su2double [nSpanWiseSections + 1];
213 FlowAngleIn [iMarker] =
new su2double [nSpanWiseSections + 1];
214 FlowAngleIn_BC [iMarker] =
new su2double [nSpanWiseSections + 1];
215 FlowAngleOut [iMarker] =
new su2double [nSpanWiseSections + 1];
216 EulerianWork [iMarker] =
new su2double [nSpanWiseSections + 1];
217 TotalEnthalpyIn [iMarker] =
new su2double [nSpanWiseSections + 1];
218 TotalEnthalpyIn_BC [iMarker] =
new su2double [nSpanWiseSections + 1];
219 EntropyIn [iMarker] =
new su2double [nSpanWiseSections + 1];
220 EntropyOut [iMarker] =
new su2double [nSpanWiseSections + 1];
221 EntropyIn_BC [iMarker] =
new su2double [nSpanWiseSections + 1];
222 PressureRatio [iMarker] =
new su2double [nSpanWiseSections + 1];
223 TotalTemperatureIn [iMarker] =
new su2double [nSpanWiseSections + 1];
224 EnthalpyOut [iMarker] =
new su2double [nSpanWiseSections + 1];
225 MachIn [iMarker] =
new su2double*[nSpanWiseSections + 1];
226 MachOut [iMarker] =
new su2double*[nSpanWiseSections + 1];
227 VelocityOutIs [iMarker] =
new su2double [nSpanWiseSections + 1];
228 DensityIn [iMarker] =
new su2double [nSpanWiseSections + 1];
229 PressureIn [iMarker] =
new su2double [nSpanWiseSections + 1];
230 TurboVelocityIn [iMarker] =
new su2double*[nSpanWiseSections + 1];
231 DensityOut [iMarker] =
new su2double [nSpanWiseSections + 1];
232 PressureOut [iMarker] =
new su2double [nSpanWiseSections + 1];
233 TurboVelocityOut [iMarker] =
new su2double*[nSpanWiseSections + 1];
234 EnthalpyOutIs [iMarker] =
new su2double [nSpanWiseSections + 1];
235 EntropyGen [iMarker] =
new su2double [nSpanWiseSections + 1];
236 AbsFlowAngleIn [iMarker] =
new su2double [nSpanWiseSections + 1];
237 TotalEnthalpyOut [iMarker] =
new su2double [nSpanWiseSections + 1];
238 TotalEnthalpyOutIs [iMarker] =
new su2double [nSpanWiseSections + 1];
239 RothalpyIn [iMarker] =
new su2double [nSpanWiseSections + 1];
240 RothalpyOut [iMarker] =
new su2double [nSpanWiseSections + 1];
241 AbsFlowAngleOut [iMarker] =
new su2double [nSpanWiseSections + 1];
242 PressureOut_BC [iMarker] =
new su2double [nSpanWiseSections + 1];
243 TemperatureIn [iMarker] =
new su2double [nSpanWiseSections + 1];
244 TemperatureOut [iMarker] =
new su2double [nSpanWiseSections + 1];
245 TotalPressureIn [iMarker] =
new su2double [nSpanWiseSections + 1];
246 TotalPressureOut [iMarker] =
new su2double [nSpanWiseSections + 1];
247 TotalTemperatureOut [iMarker] =
new su2double [nSpanWiseSections + 1];
248 EnthalpyIn [iMarker] =
new su2double [nSpanWiseSections + 1];
249 TurbIntensityIn [iMarker] =
new su2double [nSpanWiseSections + 1];
250 Turb2LamViscRatioIn [iMarker] =
new su2double [nSpanWiseSections + 1];
251 TurbIntensityOut [iMarker] =
new su2double [nSpanWiseSections + 1];
252 Turb2LamViscRatioOut [iMarker] =
new su2double [nSpanWiseSections + 1];
253 NuFactorIn [iMarker] =
new su2double [nSpanWiseSections + 1];
254 NuFactorOut [iMarker] =
new su2double [nSpanWiseSections + 1];
257 for (iSpan = 0; iSpan < nSpanWiseSections + 1; iSpan++){
258 TotalStaticEfficiency [iMarker][iSpan] = 0.0;
259 TotalTotalEfficiency [iMarker][iSpan] = 0.0;
260 KineticEnergyLoss [iMarker][iSpan] = 0.0;
261 TRadius [iMarker][iSpan] = 0.0;
262 TotalPressureLoss [iMarker][iSpan] = 0.0;
263 MassFlowIn [iMarker][iSpan] = 0.0;
264 MassFlowOut [iMarker][iSpan] = 0.0;
265 FlowAngleIn [iMarker][iSpan] = 0.0;
267 FlowAngleOut [iMarker][iSpan] = 0.0;
268 EulerianWork [iMarker][iSpan] = 0.0;
269 TotalEnthalpyIn [iMarker][iSpan] = 0.0;
270 TotalEnthalpyIn_BC [iMarker][iSpan] = 0.0;
271 EntropyIn [iMarker][iSpan] = 0.0;
272 EntropyOut [iMarker][iSpan] = 0.0;
273 EntropyIn_BC [iMarker][iSpan] = 0.0;
274 PressureRatio [iMarker][iSpan] = 0.0;
275 TotalTemperatureIn [iMarker][iSpan] = 0.0;
276 EnthalpyOut [iMarker][iSpan] = 0.0;
279 VelocityOutIs [iMarker][iSpan] = 0.0;
280 DensityIn [iMarker][iSpan] = 0.0;
281 PressureIn [iMarker][iSpan] = 0.0;
283 DensityOut [iMarker][iSpan] = 0.0;
284 PressureOut [iMarker][iSpan] = 0.0;
286 EnthalpyOutIs [iMarker][iSpan] = 0.0;
287 EntropyGen [iMarker][iSpan] = 0.0;
288 AbsFlowAngleIn [iMarker][iSpan] = 0.0;
289 TotalEnthalpyOut [iMarker][iSpan] = 0.0;
290 TotalEnthalpyOutIs [iMarker][iSpan] = 0.0;
291 RothalpyIn [iMarker][iSpan] = 0.0;
292 RothalpyOut [iMarker][iSpan] = 0.0;
293 AbsFlowAngleOut [iMarker][iSpan] = 0.0;
296 TemperatureIn [iMarker][iSpan] = 0.0;
297 TemperatureOut [iMarker][iSpan] = 0.0;
298 TotalPressureIn [iMarker][iSpan] = 0.0;
299 TotalPressureOut [iMarker][iSpan] = 0.0;
300 TotalTemperatureOut [iMarker][iSpan] = 0.0;
301 EnthalpyIn [iMarker][iSpan] = 0.0;
302 TurbIntensityIn [iMarker][iSpan] = 0.0;
303 Turb2LamViscRatioIn [iMarker][iSpan] = 0.0;
304 TurbIntensityOut [iMarker][iSpan] = 0.0;
305 Turb2LamViscRatioOut [iMarker][iSpan] = 0.0;
306 NuFactorIn [iMarker][iSpan] = 0.0;
307 NuFactorOut [iMarker][iSpan] = 0.0;
308 MachIn [iMarker][iSpan] =
new su2double[4];
309 MachOut [iMarker][iSpan] =
new su2double[4];
310 TurboVelocityIn [iMarker][iSpan] =
new su2double[4];
311 TurboVelocityOut [iMarker][iSpan] =
new su2double[4];
313 for (iDim = 0; iDim < 4; iDim++){
314 MachIn [iMarker][iSpan][iDim] = 0.0;
315 MachOut [iMarker][iSpan][iDim] = 0.0;
316 TurboVelocityIn [iMarker][iSpan][iDim] = 0.0;
317 TurboVelocityOut [iMarker][iSpan][iDim] = 0.0;
329 if (RhoRes_Old != NULL)
delete [] RhoRes_Old;
332 unsigned short iMarker, iSpan;
334 for(iMarker = 0; iMarker< nMarkerTurboPerf; iMarker++){
335 for(iSpan=0; iSpan<nSpanWiseSections+1; iSpan++){
336 delete [] MachIn [iMarker][iSpan];
337 delete [] MachOut [iMarker][iSpan];
338 delete [] TurboVelocityIn [iMarker][iSpan];
339 delete [] TurboVelocityOut[iMarker][iSpan];
342 for(iMarker = 0; iMarker< nMarkerTurboPerf; iMarker++){
343 delete [] TotalStaticEfficiency[iMarker];
344 delete [] TotalTotalEfficiency [iMarker];
345 delete [] KineticEnergyLoss [iMarker];
346 delete [] TRadius [iMarker];
347 delete [] TotalPressureLoss [iMarker];
348 delete [] MassFlowIn [iMarker];
349 delete [] MassFlowOut [iMarker];
350 delete [] FlowAngleIn [iMarker];
351 delete [] FlowAngleOut [iMarker];
352 delete [] EulerianWork [iMarker];
353 delete [] TotalEnthalpyIn [iMarker];
354 delete [] TotalEnthalpyOut [iMarker];
355 delete [] TotalEnthalpyOutIs [iMarker];
356 delete [] PressureRatio [iMarker];
357 delete [] EnthalpyOut [iMarker];
358 delete [] VelocityOutIs [iMarker];
359 delete [] TotalTemperatureIn [iMarker];
360 delete [] FlowAngleIn_BC [iMarker];
361 delete [] EntropyIn [iMarker];
362 delete [] EntropyIn_BC [iMarker];
363 delete [] EntropyOut [iMarker];
364 delete [] TotalEnthalpyIn_BC [iMarker];
365 delete [] DensityIn [iMarker];
366 delete [] PressureIn [iMarker];
367 delete [] DensityOut [iMarker];
368 delete [] PressureOut [iMarker];
369 delete [] EnthalpyOutIs [iMarker];
370 delete [] EntropyGen [iMarker];
371 delete [] AbsFlowAngleIn [iMarker];
372 delete [] RothalpyIn [iMarker];
373 delete [] RothalpyOut [iMarker];
374 delete [] AbsFlowAngleOut [iMarker];
375 delete [] PressureOut_BC [iMarker];
376 delete [] MachIn [iMarker];
377 delete [] MachOut [iMarker];
378 delete [] TurboVelocityIn [iMarker];
379 delete [] TurboVelocityOut [iMarker];
380 delete [] TemperatureIn [iMarker];
381 delete [] TemperatureOut [iMarker];
382 delete [] TotalPressureIn [iMarker];
383 delete [] TotalPressureOut [iMarker];
384 delete [] TotalTemperatureOut [iMarker];
385 delete [] EnthalpyIn [iMarker];
386 delete [] TurbIntensityIn [iMarker];
387 delete [] Turb2LamViscRatioIn [iMarker];
388 delete [] TurbIntensityOut [iMarker];
389 delete [] Turb2LamViscRatioOut [iMarker];
390 delete [] NuFactorIn [iMarker];
391 delete [] NuFactorOut [iMarker];
395 delete [] TotalStaticEfficiency;
396 delete [] TotalTotalEfficiency;
397 delete [] KineticEnergyLoss;
399 delete [] TotalPressureLoss;
400 delete [] MassFlowIn;
401 delete [] MassFlowOut;
402 delete [] FlowAngleIn;
403 delete [] FlowAngleOut;
404 delete [] EulerianWork;
405 delete [] TotalEnthalpyIn;
406 delete [] TotalEnthalpyOut;
407 delete [] TotalEnthalpyOutIs;
408 delete [] PressureRatio;
409 delete [] EnthalpyOut;
410 delete [] VelocityOutIs;
411 delete [] TotalTemperatureIn;
412 delete [] FlowAngleIn_BC;
414 delete [] EntropyIn_BC;
415 delete [] EntropyOut;
416 delete [] TotalEnthalpyIn_BC;
418 delete [] PressureIn;
419 delete [] DensityOut;
420 delete [] PressureOut;
421 delete [] EnthalpyOutIs;
422 delete [] EntropyGen;
423 delete [] AbsFlowAngleIn;
424 delete [] RothalpyIn;
425 delete [] RothalpyOut;
426 delete [] AbsFlowAngleOut;
427 delete [] PressureOut_BC;
430 delete [] TurboVelocityIn;
431 delete [] TurboVelocityOut;
432 delete [] TemperatureIn;
433 delete [] TemperatureOut;
434 delete [] TotalPressureIn;
435 delete [] TotalPressureOut;
436 delete [] TotalTemperatureOut;
437 delete [] EnthalpyIn;
438 delete [] TurbIntensityIn;
439 delete [] Turb2LamViscRatioIn;
440 delete [] TurbIntensityOut;
441 delete [] Turb2LamViscRatioOut;
442 delete [] NuFactorIn;
443 delete [] NuFactorOut;
448 CSolver *FlowSolver,
unsigned long iExtIter,
449 unsigned short val_iZone,
unsigned short val_iInst) {
451 unsigned short iMarker;
452 unsigned long iPoint, iVertex, Global_Index;
453 su2double PressCoeff = 0.0, SkinFrictionCoeff[3], HeatFlux;
454 su2double xCoord = 0.0, yCoord = 0.0, zCoord = 0.0, Mach, Pressure;
458 unsigned short nDim = geometry->
GetnDim();
464 ofstream SurfFlow_file;
482 strcat (cstr, buffer);
483 SurfFlow_file.precision(15);
484 SurfFlow_file.open(cstr, ios::out);
486 SurfFlow_file <<
"\"Global_Index\", \"x_coord\", \"y_coord\", ";
487 if (nDim == 3) SurfFlow_file <<
"\"z_coord\", ";
488 SurfFlow_file <<
"\"Pressure\", \"Pressure_Coefficient\", ";
491 case EULER : SurfFlow_file <<
"\"Mach_Number\"" <<
"\n";
break;
493 if (nDim == 2) SurfFlow_file <<
"\"Skin_Friction_Coefficient_X\", \"Skin_Friction_Coefficient_Y\", \"Heat_Flux\"" <<
"\n";
494 if (nDim == 3) SurfFlow_file <<
"\"Skin_Friction_Coefficient_X\", \"Skin_Friction_Coefficient_Y\", \"Skin_Friction_Coefficient_Z\", \"Heat_Flux\"" <<
"\n";
498 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
500 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
505 if (nDim == 3) zCoord = geometry->
node[iPoint]->
GetCoord(2);
510 xCoord *= 12.0; yCoord *= 12.0;
511 if (nDim == 3) zCoord *= 12.0;
515 PressCoeff = FlowSolver->
GetCPressure(iMarker, iVertex);
516 SurfFlow_file << scientific << Global_Index <<
", " << xCoord <<
", " << yCoord <<
", ";
517 if (nDim == 3) SurfFlow_file << scientific << zCoord <<
", ";
518 SurfFlow_file << scientific << Pressure <<
", " << PressCoeff <<
", ";
522 SurfFlow_file << scientific << Mach <<
"\n";
525 for (iDim = 0; iDim < nDim; iDim++)
526 SkinFrictionCoeff[iDim] = FlowSolver->
GetCSkinFriction(iMarker, iVertex, iDim);
527 HeatFlux = FlowSolver->
GetHeatFlux(iMarker, iVertex);
529 if (nDim == 2) SurfFlow_file << scientific << SkinFrictionCoeff[0] <<
", " << SkinFrictionCoeff[1] <<
", " << HeatFlux <<
"\n";
530 if (nDim == 3) SurfFlow_file << scientific << SkinFrictionCoeff[0] <<
", " << SkinFrictionCoeff[1] <<
", " << SkinFrictionCoeff[2] <<
", " << HeatFlux <<
"\n";
538 SurfFlow_file.close();
542 int iProcessor, nProcessor =
size;
544 unsigned long Buffer_Send_nVertex[1], *Buffer_Recv_nVertex = NULL;
545 unsigned long nVertex_Surface = 0, nLocalVertex_Surface = 0;
546 unsigned long MaxLocalVertex_Surface = 0;
552 nLocalVertex_Surface = 0;
555 for (iVertex = 0; iVertex < geometry->
GetnVertex(iMarker); iVertex++) {
557 if (geometry->
node[iPoint]->
GetDomain()) nLocalVertex_Surface++;
563 Buffer_Send_nVertex[0] = nLocalVertex_Surface;
564 if (
rank ==
MASTER_NODE) Buffer_Recv_nVertex =
new unsigned long [nProcessor];
590 su2double *Buffer_Recv_SkinFriction_x = NULL;
593 su2double *Buffer_Recv_SkinFriction_y = NULL;
596 su2double *Buffer_Recv_SkinFriction_z = NULL;
599 su2double *Buffer_Recv_HeatTransfer = NULL;
601 unsigned long *Buffer_Send_GlobalIndex =
new unsigned long [MaxLocalVertex_Surface];
602 unsigned long *Buffer_Recv_GlobalIndex = NULL;
607 Buffer_Recv_Coord_x =
new su2double [nProcessor*MaxLocalVertex_Surface];
608 Buffer_Recv_Coord_y =
new su2double [nProcessor*MaxLocalVertex_Surface];
609 if (nDim == 3) Buffer_Recv_Coord_z =
new su2double [nProcessor*MaxLocalVertex_Surface];
610 Buffer_Recv_Press =
new su2double [nProcessor*MaxLocalVertex_Surface];
611 Buffer_Recv_CPress =
new su2double [nProcessor*MaxLocalVertex_Surface];
612 Buffer_Recv_Mach =
new su2double [nProcessor*MaxLocalVertex_Surface];
613 Buffer_Recv_SkinFriction_x =
new su2double [nProcessor*MaxLocalVertex_Surface];
614 Buffer_Recv_SkinFriction_y =
new su2double [nProcessor*MaxLocalVertex_Surface];
615 if (nDim == 3) Buffer_Recv_SkinFriction_z =
new su2double [nProcessor*MaxLocalVertex_Surface];
616 Buffer_Recv_HeatTransfer =
new su2double [nProcessor*MaxLocalVertex_Surface];
617 Buffer_Recv_GlobalIndex =
new unsigned long [nProcessor*MaxLocalVertex_Surface];
627 for (iVertex = 0; iVertex < geometry->
GetnVertex(iMarker); iVertex++) {
630 Buffer_Send_Press[nVertex_Surface] = FlowSolver->
node[iPoint]->
GetPressure();
631 Buffer_Send_CPress[nVertex_Surface] = FlowSolver->
GetCPressure(iMarker, iVertex);
632 Buffer_Send_Coord_x[nVertex_Surface] = geometry->
node[iPoint]->
GetCoord(0);
633 Buffer_Send_Coord_y[nVertex_Surface] = geometry->
node[iPoint]->
GetCoord(1);
634 if (nDim == 3) { Buffer_Send_Coord_z[nVertex_Surface] = geometry->
node[iPoint]->
GetCoord(2); }
639 Buffer_Send_Coord_x[nVertex_Surface] *= 12.0;
640 Buffer_Send_Coord_y[nVertex_Surface] *= 12.0;
641 if (nDim == 3) Buffer_Send_Coord_z[nVertex_Surface] *= 12.0;
651 Buffer_Send_SkinFriction_x[nVertex_Surface] = FlowSolver->
GetCSkinFriction(iMarker, iVertex, 0);
652 Buffer_Send_SkinFriction_y[nVertex_Surface] = FlowSolver->
GetCSkinFriction(iMarker, iVertex, 1);
653 if (nDim == 3) Buffer_Send_SkinFriction_z[nVertex_Surface] = FlowSolver->
GetCSkinFriction(iMarker, iVertex, 2);
654 Buffer_Send_HeatTransfer[nVertex_Surface] = FlowSolver->
GetHeatFlux(iMarker, iVertex);
683 ofstream SurfFlow_file;
686 strcpy (cstr, filename.c_str());
700 strcat (cstr, buffer);
701 SurfFlow_file.precision(15);
702 SurfFlow_file.open(cstr, ios::out);
704 SurfFlow_file <<
"\"Global_Index\", \"x_coord\", \"y_coord\", ";
705 if (nDim == 3) SurfFlow_file <<
"\"z_coord\", ";
706 SurfFlow_file <<
"\"Pressure\", \"Pressure_Coefficient\", ";
709 case EULER :
case FEM_EULER: SurfFlow_file <<
"\"Mach_Number\"" <<
"\n";
break;
711 if (nDim == 2) SurfFlow_file <<
"\"Skin_Friction_Coefficient_X\", \"Skin_Friction_Coefficient_Y\", \"Heat_Flux\"" <<
"\n";
712 if (nDim == 3) SurfFlow_file <<
"\"Skin_Friction_Coefficient_X\", \"Skin_Friction_Coefficient_Y\", \"Skin_Friction_Coefficient_Z\", \"Heat_Flux\"" <<
"\n";
718 unsigned long Total_Index;
719 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
720 for (iVertex = 0; iVertex < Buffer_Recv_nVertex[iProcessor]; iVertex++) {
723 Total_Index = iProcessor*MaxLocalVertex_Surface+iVertex;
724 Global_Index = Buffer_Recv_GlobalIndex[Total_Index];
727 xCoord = Buffer_Recv_Coord_x[Total_Index];
728 yCoord = Buffer_Recv_Coord_y[Total_Index];
729 if (nDim == 3) zCoord = Buffer_Recv_Coord_z[Total_Index];
730 Pressure = Buffer_Recv_Press[Total_Index];
731 PressCoeff = Buffer_Recv_CPress[Total_Index];
734 SurfFlow_file << scientific << Global_Index <<
", " << xCoord <<
", " << yCoord <<
", ";
735 if (nDim == 3) SurfFlow_file << scientific << zCoord <<
", ";
736 SurfFlow_file << scientific << Pressure <<
", " << PressCoeff <<
", ";
742 Mach = Buffer_Recv_Mach[Total_Index];
743 SurfFlow_file << scientific << Mach <<
"\n";
747 SkinFrictionCoeff[0] = Buffer_Recv_SkinFriction_x[Total_Index];
748 SkinFrictionCoeff[1] = Buffer_Recv_SkinFriction_y[Total_Index];
749 if (nDim == 3) SkinFrictionCoeff[2] = Buffer_Recv_SkinFriction_z[Total_Index];
750 HeatFlux = Buffer_Recv_HeatTransfer[Total_Index];
751 if (nDim == 2) SurfFlow_file << scientific << SkinFrictionCoeff[0] <<
", " << SkinFrictionCoeff[1] <<
", " << HeatFlux <<
"\n";
752 if (nDim == 3) SurfFlow_file << scientific << SkinFrictionCoeff[0] <<
", " << SkinFrictionCoeff[1] <<
", " << SkinFrictionCoeff[2] <<
", " << HeatFlux <<
"\n";
759 SurfFlow_file.close();
763 delete [] Buffer_Recv_Coord_x;
764 delete [] Buffer_Recv_Coord_y;
765 if (nDim == 3)
delete [] Buffer_Recv_Coord_z;
766 delete [] Buffer_Recv_Press;
767 delete [] Buffer_Recv_CPress;
768 delete [] Buffer_Recv_Mach;
769 delete [] Buffer_Recv_SkinFriction_x;
770 delete [] Buffer_Recv_SkinFriction_y;
771 if (nDim == 3)
delete [] Buffer_Recv_SkinFriction_z;
772 delete [] Buffer_Recv_HeatTransfer;
773 delete [] Buffer_Recv_GlobalIndex;
775 delete [] Buffer_Recv_nVertex;
781 delete [] Buffer_Send_Coord_x;
782 delete [] Buffer_Send_Coord_y;
783 delete [] Buffer_Send_Coord_z;
784 delete [] Buffer_Send_Press;
785 delete [] Buffer_Send_CPress;
786 delete [] Buffer_Send_Mach;
787 delete [] Buffer_Send_SkinFriction_x;
788 delete [] Buffer_Send_SkinFriction_y;
789 delete [] Buffer_Send_SkinFriction_z;
790 delete [] Buffer_Send_HeatTransfer;
791 delete [] Buffer_Send_GlobalIndex;
801 unsigned long iPoint, iVertex, Global_Index;
802 su2double *Solution, xCoord, yCoord, zCoord;
803 unsigned short iMarker;
804 char cstr[200], buffer[50];
805 ofstream SurfAdj_file;
826 strcat(cstr, buffer);
827 SurfAdj_file.precision(15);
828 SurfAdj_file.open(cstr, ios::out);
832 if (geometry->
GetnDim() == 2) {
834 SurfAdj_file <<
"\"Point\",\"Sensitivity\",\"PsiRho\",\"Phi_x\",\"Phi_y\",\"PsiE\",\"x_coord\",\"y_coord\"";
836 SurfAdj_file <<
"\"Point\",\"Sensitivity\",\"PsiRho\",\"Phi_x\",\"Phi_y\",\"x_coord\",\"y_coord\"";
839 SurfAdj_file <<
",\"x_Sens\",\"y_Sens\"";
841 SurfAdj_file <<
",\"Sens_Transp\"";
843 SurfAdj_file <<
"\n";
845 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
847 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
861 SurfAdj_file << scientific << Global_Index <<
", " << AdjSolver->
GetCSensitivity(iMarker, iVertex) <<
", " << Solution[0] <<
", "
862 << Solution[1] <<
", " << Solution[2] <<
", " << Solution[3] <<
", " << xCoord <<
", "<< yCoord;
864 SurfAdj_file << scientific << Global_Index <<
", " << AdjSolver->
GetCSensitivity(iMarker, iVertex) <<
", " << Solution[0] <<
", "
865 << Solution[1] <<
", " << Solution[2] <<
", " << xCoord <<
", "<< yCoord;
871 SurfAdj_file <<
"\n";
876 if (geometry->
GetnDim() == 3) {
878 SurfAdj_file <<
"\"Point\",\"Sensitivity\",\"PsiRho\",\"Phi_x\",\"Phi_y\",\"Phi_z\",\"PsiE\",\"x_coord\",\"y_coord\",\"z_coord\"";
880 SurfAdj_file <<
"\"Point\",\"Sensitivity\",\"PsiRho\",\"Phi_x\",\"Phi_y\",\"Phi_z\",\"x_coord\",\"y_coord\",\"z_coord\"";
883 SurfAdj_file <<
",\"x_Sens\",\"y_Sens\",\"z_Sens\"";
885 SurfAdj_file <<
",\"Sens_Transp\"";
887 SurfAdj_file <<
"\n";
888 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
890 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
907 SurfAdj_file << scientific << Global_Index <<
", " << AdjSolver->
GetCSensitivity(iMarker, iVertex) <<
", " << Solution[0] <<
", "
908 << Solution[1] <<
", " << Solution[2] <<
", " << Solution[3] <<
", " << Solution[4] <<
", "<< xCoord <<
", "<< yCoord <<
", "<< zCoord;
910 SurfAdj_file << scientific << Global_Index <<
", " << AdjSolver->
GetCSensitivity(iMarker, iVertex) <<
", " << Solution[0] <<
", "
911 << Solution[1] <<
", " << Solution[2] <<
", " << Solution[3] <<
", " << xCoord <<
", "<< yCoord <<
", "<< zCoord;
918 SurfAdj_file <<
"\n";
923 SurfAdj_file.close();
926 int iProcessor, nProcessor =
size;
928 unsigned short nDim = geometry->
GetnDim(), iMarker;
930 unsigned long Buffer_Send_nVertex[1], iVertex, iPoint, nVertex_Surface = 0, nLocalVertex_Surface = 0,
931 MaxLocalVertex_Surface = 0, nBuffer_Scalar;
932 unsigned long *Buffer_Receive_nVertex = NULL;
933 ofstream SurfAdj_file;
938 nLocalVertex_Surface = 0;
941 for (iVertex = 0; iVertex < geometry->
GetnVertex(iMarker); iVertex++) {
943 if (geometry->
node[iPoint]->
GetDomain()) nLocalVertex_Surface ++;
947 Buffer_Receive_nVertex =
new unsigned long [nProcessor];
949 Buffer_Send_nVertex[0] = nLocalVertex_Surface;
957 unsigned long *Buffer_Send_GlobalPoint=
new unsigned long[MaxLocalVertex_Surface];
966 Buffer_Send_PsiE =
new su2double[MaxLocalVertex_Surface];
968 su2double *Buffer_Send_Sens_x = NULL, *Buffer_Send_Sens_y = NULL, *Buffer_Send_Sens_z = NULL;
969 su2double *Buffer_Send_Sens_Transp = NULL;
972 Buffer_Send_Sens_x =
new su2double[MaxLocalVertex_Surface];
973 Buffer_Send_Sens_y =
new su2double[MaxLocalVertex_Surface];
975 Buffer_Send_Sens_z =
new su2double[MaxLocalVertex_Surface];
978 Buffer_Send_Sens_Transp =
new su2double[MaxLocalVertex_Surface];
985 for (iVertex = 0; iVertex < geometry->
GetnVertex(iMarker); iVertex++) {
993 Buffer_Send_Coord_x[nVertex_Surface] = Coord[0];
994 Buffer_Send_Coord_y[nVertex_Surface] = Coord[1];
995 Buffer_Send_Sensitivity[nVertex_Surface] = AdjSolver->
GetCSensitivity(iMarker, iVertex);
996 Buffer_Send_PsiRho[nVertex_Surface] = Solution[0];
997 Buffer_Send_Phi_x[nVertex_Surface] = Solution[1];
998 Buffer_Send_Phi_y[nVertex_Surface] = Solution[2];
1001 Buffer_Send_Coord_z[nVertex_Surface] = Coord[2];
1002 Buffer_Send_Phi_z[nVertex_Surface] = Solution[3];
1019 Buffer_Send_Coord_x[nVertex_Surface] *= 12.0;
1020 Buffer_Send_Coord_y[nVertex_Surface] *= 12.0;
1021 if (nDim == 3) Buffer_Send_Coord_z[nVertex_Surface] *= 12.0;
1028 su2double *Buffer_Receive_Coord_x = NULL, *Buffer_Receive_Coord_y = NULL, *Buffer_Receive_Coord_z = NULL, *Buffer_Receive_Sensitivity = NULL,
1029 *Buffer_Receive_PsiRho = NULL, *Buffer_Receive_Phi_x = NULL, *Buffer_Receive_Phi_y = NULL, *Buffer_Receive_Phi_z = NULL,
1030 *Buffer_Receive_PsiE = NULL, *Buffer_Receive_Sens_x = NULL, *Buffer_Receive_Sens_y = NULL, *Buffer_Receive_Sens_z = NULL,
1031 *Buffer_Receive_Sens_Transp = NULL;
1032 unsigned long *Buffer_Receive_GlobalPoint = NULL;
1035 Buffer_Receive_Coord_x =
new su2double [nProcessor*MaxLocalVertex_Surface];
1036 Buffer_Receive_Coord_y =
new su2double [nProcessor*MaxLocalVertex_Surface];
1037 if (nDim == 3) Buffer_Receive_Coord_z =
new su2double [nProcessor*MaxLocalVertex_Surface];
1038 Buffer_Receive_GlobalPoint =
new unsigned long [nProcessor*MaxLocalVertex_Surface];
1039 Buffer_Receive_Sensitivity =
new su2double [nProcessor*MaxLocalVertex_Surface];
1040 Buffer_Receive_PsiRho =
new su2double [nProcessor*MaxLocalVertex_Surface];
1041 Buffer_Receive_Phi_x =
new su2double [nProcessor*MaxLocalVertex_Surface];
1042 Buffer_Receive_Phi_y =
new su2double [nProcessor*MaxLocalVertex_Surface];
1043 if (nDim == 3) Buffer_Receive_Phi_z =
new su2double [nProcessor*MaxLocalVertex_Surface];
1045 Buffer_Receive_PsiE =
new su2double [nProcessor*MaxLocalVertex_Surface];
1047 Buffer_Receive_Sens_x =
new su2double[nProcessor*MaxLocalVertex_Surface];
1048 Buffer_Receive_Sens_y =
new su2double[nProcessor*MaxLocalVertex_Surface];
1050 Buffer_Receive_Sens_z =
new su2double[nProcessor*MaxLocalVertex_Surface];
1053 Buffer_Receive_Sens_Transp =
new su2double[nProcessor*MaxLocalVertex_Surface];
1058 nBuffer_Scalar = MaxLocalVertex_Surface;
1085 unsigned long iVertex, GlobalPoint, position;
1086 char cstr[200], buffer[50];
1087 ofstream SurfAdj_file;
1091 strcpy (cstr, filename.c_str());
1106 strcat (cstr, buffer);
1107 SurfAdj_file.open(cstr, ios::out);
1108 SurfAdj_file.precision(15);
1113 if (geometry->
GetnDim() == 2) {
1115 SurfAdj_file <<
"\"Point\",\"Sensitivity\",\"PsiRho\",\"Phi_x\",\"Phi_y\",\"PsiE\",\"x_coord\",\"y_coord\"";
1117 SurfAdj_file <<
"\"Point\",\"Sensitivity\",\"PsiRho\",\"Phi_x\",\"Phi_y\",\"x_coord\",\"y_coord\"";
1120 SurfAdj_file <<
",\" x_Sens\",\"y_Sens\"";
1122 SurfAdj_file <<
",\"Sens_Transp\"";
1124 SurfAdj_file <<
"\n";
1126 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++)
1127 for (iVertex = 0; iVertex < Buffer_Receive_nVertex[iProcessor]; iVertex++) {
1129 position = iProcessor*MaxLocalVertex_Surface+iVertex;
1130 GlobalPoint = Buffer_Receive_GlobalPoint[position];
1133 SurfAdj_file << scientific << GlobalPoint <<
1134 ", " << Buffer_Receive_Sensitivity[position] <<
", " << Buffer_Receive_PsiRho[position] <<
1135 ", " << Buffer_Receive_Phi_x[position] <<
", " << Buffer_Receive_Phi_y[position] <<
1136 ", " << Buffer_Receive_PsiE[position] <<
", " << Buffer_Receive_Coord_x[position] <<
1137 ", "<< Buffer_Receive_Coord_y[position];
1139 SurfAdj_file << scientific << GlobalPoint <<
1140 ", " << Buffer_Receive_Sensitivity[position] <<
", " << Buffer_Receive_PsiRho[position] <<
1141 ", " << Buffer_Receive_Phi_x[position] <<
", " << Buffer_Receive_Phi_y[position] <<
1142 ", " << Buffer_Receive_Coord_x[position] <<
1143 ", "<< Buffer_Receive_Coord_y[position];
1145 SurfAdj_file <<
", " << Buffer_Receive_Sens_x[position] <<
", " << Buffer_Receive_Sens_y[position];
1147 SurfAdj_file <<
", " << Buffer_Receive_Sens_Transp[position];
1150 SurfAdj_file <<
"\n";
1155 if (geometry->
GetnDim() == 3) {
1157 SurfAdj_file <<
"\"Point\",\"Sensitivity\",\"PsiRho\",\"Phi_x\",\"Phi_y\",\"Phi_z\",\"PsiE\",\"x_coord\",\"y_coord\",\"z_coord\"";
1159 SurfAdj_file <<
"\"Point\",\"Sensitivity\",\"PsiRho\",\"Phi_x\",\"Phi_y\",\"Phi_z\",\"x_coord\",\"y_coord\",\"z_coord\"";
1162 SurfAdj_file <<
",\"x_Sens\",\"y_Sens\",\"z_Sens\"";
1164 SurfAdj_file <<
",\"Sens_Transp\"";
1166 SurfAdj_file <<
"\n";
1168 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++)
1169 for (iVertex = 0; iVertex < Buffer_Receive_nVertex[iProcessor]; iVertex++) {
1170 position = iProcessor*MaxLocalVertex_Surface+iVertex;
1171 GlobalPoint = Buffer_Receive_GlobalPoint[position];
1174 SurfAdj_file << scientific << GlobalPoint <<
1175 ", " << Buffer_Receive_Sensitivity[position] <<
", " << Buffer_Receive_PsiRho[position] <<
1176 ", " << Buffer_Receive_Phi_x[position] <<
", " << Buffer_Receive_Phi_y[position] <<
", " << Buffer_Receive_Phi_z[position] <<
1177 ", " << Buffer_Receive_PsiE[position] <<
", "<< Buffer_Receive_Coord_x[position] <<
1178 ", "<< Buffer_Receive_Coord_y[position] <<
", "<< Buffer_Receive_Coord_z[position];
1180 SurfAdj_file << scientific << GlobalPoint <<
1181 ", " << Buffer_Receive_Sensitivity[position] <<
", " << Buffer_Receive_PsiRho[position] <<
1182 ", " << Buffer_Receive_Phi_x[position] <<
", " << Buffer_Receive_Phi_y[position] <<
", " << Buffer_Receive_Phi_z[position] <<
1183 ", "<< Buffer_Receive_Coord_x[position] <<
1184 ", "<< Buffer_Receive_Coord_y[position] <<
", "<< Buffer_Receive_Coord_z[position];
1187 SurfAdj_file <<
", " << Buffer_Receive_Sens_x[position] <<
", " << Buffer_Receive_Sens_y[position] <<
", " << Buffer_Receive_Sens_z[position];
1189 SurfAdj_file <<
", " << Buffer_Receive_Sens_Transp[position];
1192 SurfAdj_file <<
"\n";
1199 delete [] Buffer_Receive_nVertex;
1200 delete [] Buffer_Receive_Coord_x;
1201 delete [] Buffer_Receive_Coord_y;
1202 if (nDim == 3)
delete [] Buffer_Receive_Coord_z;
1203 delete [] Buffer_Receive_Sensitivity;
1204 delete [] Buffer_Receive_PsiRho;
1205 delete [] Buffer_Receive_Phi_x;
1206 delete [] Buffer_Receive_Phi_y;
1207 if (nDim == 3)
delete [] Buffer_Receive_Phi_z;
1209 delete [] Buffer_Receive_PsiE;
1210 delete [] Buffer_Receive_GlobalPoint;
1212 delete [] Buffer_Receive_Sens_x;
1213 delete [] Buffer_Receive_Sens_y;
1215 delete [] Buffer_Receive_Sens_z;
1218 delete [] Buffer_Receive_Sens_Transp;
1223 delete [] Buffer_Send_Coord_x;
1224 delete [] Buffer_Send_Coord_y;
1225 delete [] Buffer_Send_Coord_z;
1226 delete [] Buffer_Send_GlobalPoint;
1227 delete [] Buffer_Send_Sensitivity;
1228 delete [] Buffer_Send_PsiRho;
1229 delete [] Buffer_Send_Phi_x;
1230 delete [] Buffer_Send_Phi_y;
1231 delete [] Buffer_Send_Phi_z;
1232 delete [] Buffer_Send_PsiE;
1233 if (Buffer_Send_Sens_x != NULL)
delete [] Buffer_Send_Sens_x;
1234 if (Buffer_Send_Sens_y != NULL)
delete [] Buffer_Send_Sens_y;
1235 if (Buffer_Send_Sens_z != NULL)
delete [] Buffer_Send_Sens_z;
1236 if (Buffer_Send_Sens_Transp != NULL)
delete [] Buffer_Send_Sens_Transp;
1238 SurfAdj_file.close();
1259 cout <<
"Merging volumetric triangle grid connectivity." << endl;
1263 cout <<
"Merging volumetric quadrilateral grid connectivity." << endl;
1267 cout <<
"Merging volumetric tetrahedron grid connectivity." << endl;
1271 cout <<
"Merging volumetric hexahedron grid connectivity." << endl;
1275 cout <<
"Merging volumetric prism grid connectivity." << endl;
1279 cout <<
"Merging volumetric pyramid grid connectivity." << endl;
1289 cout <<
"Merging surface line grid connectivity." << endl;
1293 cout <<
"Merging surface triangle grid connectivity." << endl;
1297 cout <<
"Merging surface quadrilateral grid connectivity." << endl;
1304 nGlobal_Elem = nGlobal_Tria + nGlobal_Quad + nGlobal_Tetr +
1305 nGlobal_Hexa + nGlobal_Pyra + nGlobal_Pris;
1309 nSurf_Elem = nGlobal_Line + nGlobal_BoundTria + nGlobal_BoundQuad;
1317 unsigned short iDim, nDim = geometry->
GetnDim();
1318 unsigned long iPoint;
1327 unsigned short iMarker;
1328 unsigned long iVertex, nTotalPoints = 0;
1334 int *Local_Halo =
new int[geometry->
GetnPoint()];
1335 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
1338 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
1341 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
1355 if (isPeriodic && (SendRecv < 0)) {
1356 Local_Halo[iPoint] =
false;
1364 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
1365 if (!Local_Halo[iPoint]) nTotalPoints++;
1367 nGlobal_Poin = nTotalPoints;
1373 for (iDim = 0; iDim < nDim; iDim++) {
1374 Coords[iDim] =
new su2double[nGlobal_Poin];
1379 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
1384 if (!Local_Halo[iPoint]) {
1390 for (iDim = 0; iDim < nDim; iDim++) {
1391 Coords[iDim][iGlobal_Index] = geometry->
node[iPoint]->
GetCoord(iDim);
1396 Coords[iDim][iGlobal_Index] *= 12.0;
1405 delete [] Local_Halo;
1410 int iProcessor, nProcessor =
size;
1411 unsigned long jPoint;
1413 bool Wrt_Halo = config->
GetWrt_Halo(), isPeriodic;
1417 unsigned long iVertex, iMarker;
1418 unsigned long Buffer_Send_nPoin[1], *Buffer_Recv_nPoin = NULL;
1419 unsigned long nLocalPoint = 0, MaxLocalPoint = 0;
1420 unsigned long iGlobal_Index = 0, nBuffer_Scalar = 0;
1422 if (
rank ==
MASTER_NODE) Buffer_Recv_nPoin =
new unsigned long[nProcessor];
1424 int *Local_Halo =
new int[geometry->
GetnPoint()];
1425 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
1435 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
1441 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
1455 Local_Halo[iPoint] =
false;
1463 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
1464 if (Local_Halo[iPoint] ==
false)
1467 Buffer_Send_nPoin[0] = nLocalPoint;
1477 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
1478 nGlobal_Doma += Buffer_Recv_nPoin[iProcessor];
1481 nBuffer_Scalar = MaxLocalPoint;
1491 su2double *Buffer_Send_Z = NULL, *Buffer_Recv_Z = NULL;
1492 if (nDim == 3) Buffer_Send_Z =
new su2double[MaxLocalPoint];
1494 unsigned long *Buffer_Send_GlobalIndex =
new unsigned long[MaxLocalPoint];
1495 unsigned long *Buffer_Recv_GlobalIndex = NULL;
1501 Buffer_Recv_X =
new su2double[nProcessor*MaxLocalPoint];
1502 Buffer_Recv_Y =
new su2double[nProcessor*MaxLocalPoint];
1503 if (nDim == 3) Buffer_Recv_Z =
new su2double[nProcessor*MaxLocalPoint];
1504 Buffer_Recv_GlobalIndex =
new unsigned long[nProcessor*MaxLocalPoint];
1508 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
1509 nGlobal_Poin += Buffer_Recv_nPoin[iProcessor];
1512 for (iDim = 0; iDim < nDim; iDim++) {
1513 Coords[iDim] =
new su2double[nGlobal_Poin];
1524 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
1527 if (!Local_Halo[iPoint] || Wrt_Halo) {
1533 Buffer_Send_X[jPoint] = Coords_Local[0];
1534 Buffer_Send_Y[jPoint] = Coords_Local[1];
1535 if (nDim == 3) Buffer_Send_Z[jPoint] = Coords_Local[2];
1540 Buffer_Send_X[jPoint] *= 12.0;
1541 Buffer_Send_Y[jPoint] *= 12.0;
1542 if (nDim == 3) Buffer_Send_Z[jPoint] *= 12.0;
1567 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
1568 for (iPoint = 0; iPoint < Buffer_Recv_nPoin[iProcessor]; iPoint++) {
1570 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
1571 if (iGlobal_Index >= nGlobal_Poin) {
1572 cout << iGlobal_Index <<
" " << nGlobal_Poin << endl;
1574 Coords[0][iGlobal_Index] = Buffer_Recv_X[jPoint];
1575 Coords[1][iGlobal_Index] = Buffer_Recv_Y[jPoint];
1576 if (nDim == 3) Coords[2][iGlobal_Index] = Buffer_Recv_Z[jPoint];
1580 jPoint = (iProcessor+1)*nBuffer_Scalar;
1586 delete [] Local_Halo;
1587 delete [] Buffer_Send_X;
1588 delete [] Buffer_Send_Y;
1589 if (Buffer_Send_Z != NULL)
delete [] Buffer_Send_Z;
1590 delete [] Buffer_Send_GlobalIndex;
1592 delete [] Buffer_Recv_X;
1593 delete [] Buffer_Recv_Y;
1594 if (Buffer_Recv_Z != NULL)
delete [] Buffer_Recv_Z;
1595 delete [] Buffer_Recv_GlobalIndex;
1596 delete [] Buffer_Recv_nPoin;
1606 unsigned short NODES_PER_ELEMENT = 0;
1607 unsigned long iPoint, iNode, jNode;
1608 unsigned long iElem = 0;
1609 unsigned long nLocalElem = 0, nElem_Total = 0;
1611 unsigned long iVertex, iMarker;
1612 unsigned long jElem;
1613 int SendRecv, RecvFrom;
1615 unsigned long Buffer_Send_nElem[1], *Buffer_Recv_nElem = NULL;
1616 unsigned long nBuffer_Scalar = 0;
1617 unsigned long kNode = 0, kElem = 0;
1618 unsigned long MaxLocalElem = 0, iGlobal_Index, jPoint, kPoint;
1621 bool *Write_Elem = NULL, notPeriodic, notHalo, addedPeriodic, isPeriodic;
1625 int *Conn_Elem = NULL;
1632 switch (Elem_Type) {
1664 Buffer_Send_nElem[0] = nLocalElem;
1671 MaxLocalElem = nLocalElem;
1672 Buffer_Recv_nElem[0] = Buffer_Send_nElem[0];
1675 nBuffer_Scalar = MaxLocalElem*NODES_PER_ELEMENT;
1679 unsigned long *Buffer_Send_Elem =
new unsigned long[nBuffer_Scalar];
1680 unsigned long *Buffer_Recv_Elem = NULL;
1682 unsigned short *Buffer_Send_Halo =
new unsigned short[MaxLocalElem];
1683 unsigned short *Buffer_Recv_Halo = NULL;
1688 Buffer_Recv_Elem =
new unsigned long[
size*nBuffer_Scalar];
1689 Buffer_Recv_Halo =
new unsigned short[
size*MaxLocalElem];
1690 if (MaxLocalElem > 0) Conn_Elem =
new int[
size*MaxLocalElem*NODES_PER_ELEMENT];
1698 vector<unsigned long> Added_Periodic;
1699 Added_Periodic.clear();
1702 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
1705 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
1724 unsigned long nAddedPeriodic = 0, maxAddedPeriodic = 0;
1725 unsigned long Buffer_Send_nAddedPeriodic[1], *Buffer_Recv_nAddedPeriodic = NULL;
1726 Buffer_Recv_nAddedPeriodic =
new unsigned long[
size];
1728 nAddedPeriodic = Added_Periodic.size();
1729 Buffer_Send_nAddedPeriodic[0] = nAddedPeriodic;
1737 maxAddedPeriodic = nAddedPeriodic;
1738 Buffer_Recv_nAddedPeriodic[0] = Buffer_Send_nAddedPeriodic[0];
1742 unsigned long *Buffer_Send_AddedPeriodic =
new unsigned long[maxAddedPeriodic];
1743 unsigned long *Buffer_Recv_AddedPeriodic =
new unsigned long[
size*maxAddedPeriodic];
1745 for (iPoint = 0; iPoint < Added_Periodic.size(); iPoint++) {
1746 Buffer_Send_AddedPeriodic[iPoint] = Added_Periodic[iPoint];
1757 for (iPoint = 0; iPoint < maxAddedPeriodic; iPoint++) Buffer_Recv_AddedPeriodic[iPoint] = Buffer_Send_AddedPeriodic[iPoint];
1767 int *Local_Halo =
new int[geometry->
GetnPoint()];
1768 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
1771 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
1774 RecvFrom = abs(SendRecv)-1;
1776 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
1782 (SendRecv < 0) && (
rank > RecvFrom));
1794 notPeriodic = (isPeriodic && (SendRecv < 0));
1798 addedPeriodic =
false; kPoint = 0;
1799 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
1800 for (jPoint = 0; jPoint < Buffer_Recv_nAddedPeriodic[iProcessor]; jPoint++) {
1801 if (iGlobal_Index == Buffer_Recv_AddedPeriodic[kPoint+jPoint])
1802 addedPeriodic =
true;
1805 kPoint = (iProcessor+1)*maxAddedPeriodic;
1809 if ((notHalo || notPeriodic) && !addedPeriodic) {
1810 Local_Halo[iPoint] =
false;
1820 jNode = 0; jElem = 0;
1821 for (iElem = 0; iElem < geometry->
GetnElem(); iElem++) {
1827 Buffer_Send_Halo[jElem] =
false;
1828 for (iNode = 0; iNode < NODES_PER_ELEMENT; iNode++) {
1839 if (Local_Halo[iPoint]) {
1840 Buffer_Send_Halo[jElem] =
true;
1858 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Elem[iPoint] = Buffer_Send_Elem[iPoint];
1859 for (iPoint = 0; iPoint < MaxLocalElem; iPoint++) Buffer_Recv_Halo[iPoint] = Buffer_Send_Halo[iPoint];
1870 Write_Elem =
new bool[
size*MaxLocalElem];
1871 for (iElem = 0; iElem <
size*MaxLocalElem; iElem++) {
1872 Write_Elem[iElem] =
true;
1883 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
1884 for (iElem = 0; iElem < Buffer_Recv_nElem[iProcessor]; iElem++) {
1887 if (Buffer_Recv_Halo[kElem+iElem])
1888 Write_Elem[kElem+iElem] =
false;
1891 kElem = (iProcessor+1)*MaxLocalElem;
1897 jNode = 0; kNode = 0; jElem = 0; nElem_Total = 0;
1898 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
1899 for (iElem = 0; iElem < Buffer_Recv_nElem[iProcessor]; iElem++) {
1902 if (Write_Elem[jElem+iElem]) {
1911 for (iNode = 0; iNode < NODES_PER_ELEMENT; iNode++) {
1912 Conn_Elem[kNode] = (int)Buffer_Recv_Elem[jNode+iElem*NODES_PER_ELEMENT+iNode] + 1;
1918 jElem = (iProcessor+1)*MaxLocalElem;
1919 jNode = (iProcessor+1)*nBuffer_Scalar;
1924 delete [] Buffer_Send_Elem;
1925 delete [] Buffer_Send_Halo;
1926 delete [] Buffer_Recv_nAddedPeriodic;
1927 delete [] Buffer_Send_AddedPeriodic;
1928 delete [] Buffer_Recv_AddedPeriodic;
1929 delete [] Local_Halo;
1931 delete [] Buffer_Recv_nElem;
1932 delete [] Buffer_Recv_Elem;
1933 delete [] Buffer_Recv_Halo;
1934 delete [] Write_Elem;
1941 switch (Elem_Type) {
1943 nGlobal_Tria = nElem_Total;
1944 if (nGlobal_Tria > 0) Conn_Tria = Conn_Elem;
1947 nGlobal_Quad = nElem_Total;
1948 if (nGlobal_Quad > 0) Conn_Quad = Conn_Elem;
1951 nGlobal_Tetr = nElem_Total;
1952 if (nGlobal_Tetr > 0) Conn_Tetr = Conn_Elem;
1955 nGlobal_Hexa = nElem_Total;
1956 if (nGlobal_Hexa > 0) Conn_Hexa = Conn_Elem;
1959 nGlobal_Pris = nElem_Total;
1960 if (nGlobal_Pris > 0) Conn_Pris = Conn_Elem;
1963 nGlobal_Pyra = nElem_Total;
1964 if (nGlobal_Pyra > 0) Conn_Pyra = Conn_Elem;
1976 unsigned short NODES_PER_ELEMENT;
1978 unsigned short iMarker;
1979 unsigned long iPoint, iNode, jNode;
1980 unsigned long iElem = 0;
1981 unsigned long nLocalElem = 0, nElem_Total = 0;
1984 unsigned long jElem;
1986 unsigned long iVertex;
1988 int SendRecv, RecvFrom;
1990 unsigned long Buffer_Send_nElem[1], *Buffer_Recv_nElem = NULL;
1991 unsigned long nBuffer_Scalar = 0;
1992 unsigned long kNode = 0, kElem = 0;
1993 unsigned long MaxLocalElem = 0, iGlobal_Index, jPoint, kPoint;
1996 bool *Write_Elem = NULL, notPeriodic, notHalo, addedPeriodic;
1999 int *Conn_Elem = NULL;
2008 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
2010 for (iElem = 0; iElem < geometry->
GetnElem_Bound(iMarker); iElem++) {
2018 switch (Elem_Type) {
2030 NODES_PER_ELEMENT = 0;
2037 Buffer_Send_nElem[0] = nLocalElem;
2044 MaxLocalElem = nLocalElem;
2045 Buffer_Recv_nElem[0] = Buffer_Send_nElem[0];
2048 nBuffer_Scalar = MaxLocalElem*NODES_PER_ELEMENT;
2052 unsigned long *Buffer_Send_Elem =
new unsigned long[nBuffer_Scalar];
2053 unsigned long *Buffer_Recv_Elem = NULL;
2055 unsigned short *Buffer_Send_Halo =
new unsigned short[MaxLocalElem];
2056 unsigned short *Buffer_Recv_Halo = NULL;
2061 Buffer_Recv_Elem =
new unsigned long[
size*nBuffer_Scalar];
2062 Buffer_Recv_Halo =
new unsigned short[
size*MaxLocalElem];
2063 if (MaxLocalElem > 0) Conn_Elem =
new int[
size*MaxLocalElem*NODES_PER_ELEMENT];
2071 vector<unsigned long> Added_Periodic;
2072 Added_Periodic.clear();
2073 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
2076 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
2093 unsigned long nAddedPeriodic = 0, maxAddedPeriodic = 0;
2094 unsigned long Buffer_Send_nAddedPeriodic[1], *Buffer_Recv_nAddedPeriodic = NULL;
2095 Buffer_Recv_nAddedPeriodic =
new unsigned long[
size];
2097 nAddedPeriodic = Added_Periodic.size();
2098 Buffer_Send_nAddedPeriodic[0] = nAddedPeriodic;
2106 maxAddedPeriodic = nAddedPeriodic;
2107 Buffer_Recv_nAddedPeriodic[0] = Buffer_Send_nAddedPeriodic[0];
2111 unsigned long *Buffer_Send_AddedPeriodic =
new unsigned long[maxAddedPeriodic];
2112 unsigned long *Buffer_Recv_AddedPeriodic =
new unsigned long[
size*maxAddedPeriodic];
2114 for (iPoint = 0; iPoint < Added_Periodic.size(); iPoint++) {
2115 Buffer_Send_AddedPeriodic[iPoint] = Added_Periodic[iPoint];
2126 for (iPoint = 0; iPoint < maxAddedPeriodic; iPoint++) Buffer_Recv_AddedPeriodic[iPoint] = Buffer_Send_AddedPeriodic[iPoint];
2136 int *Local_Halo =
new int[geometry->
GetnPoint()];
2137 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
2140 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
2143 RecvFrom = abs(SendRecv)-1;
2145 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
2151 (SendRecv < 0) && (
rank > RecvFrom));
2160 addedPeriodic =
false; kPoint = 0;
2161 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
2162 for (jPoint = 0; jPoint < Buffer_Recv_nAddedPeriodic[iProcessor]; jPoint++) {
2163 if (iGlobal_Index == Buffer_Recv_AddedPeriodic[kPoint+jPoint])
2164 addedPeriodic =
true;
2167 kPoint = (iProcessor+1)*maxAddedPeriodic;
2171 if ((notHalo || notPeriodic) && !addedPeriodic) {
2172 Local_Halo[iPoint] =
false;
2181 jNode = 0; jElem = 0;
2184 for (iElem = 0; iElem < geometry->
GetnElem_Bound(iMarker); iElem++) {
2191 Buffer_Send_Halo[jElem] =
false;
2192 for (iNode = 0; iNode < NODES_PER_ELEMENT; iNode++) {
2196 iPoint = geometry->
bound[iMarker][iElem]->
GetNode(iNode);
2203 if (Local_Halo[iPoint])
2204 Buffer_Send_Halo[jElem] =
true;
2221 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Elem[iPoint] = Buffer_Send_Elem[iPoint];
2222 for (iPoint = 0; iPoint < MaxLocalElem; iPoint++) Buffer_Recv_Halo[iPoint] = Buffer_Send_Halo[iPoint];
2233 Write_Elem =
new bool[
size*MaxLocalElem];
2234 for (iElem = 0; iElem <
size*MaxLocalElem; iElem++) {
2235 Write_Elem[iElem] =
true;
2246 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
2247 for (iElem = 0; iElem < Buffer_Recv_nElem[iProcessor]; iElem++) {
2250 if (Buffer_Recv_Halo[kElem+iElem])
2251 Write_Elem[kElem+iElem] =
false;
2254 kElem = (iProcessor+1)*MaxLocalElem;
2260 jNode = 0; kNode = 0; jElem = 0; nElem_Total = 0;
2261 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
2262 for (iElem = 0; iElem < Buffer_Recv_nElem[iProcessor]; iElem++) {
2265 if (Write_Elem[jElem+iElem]) {
2274 for (iNode = 0; iNode < NODES_PER_ELEMENT; iNode++) {
2275 Conn_Elem[kNode] = (int)Buffer_Recv_Elem[jNode+iElem*NODES_PER_ELEMENT+iNode] + 1;
2281 jElem = (iProcessor+1)*MaxLocalElem;
2282 jNode = (iProcessor+1)*nBuffer_Scalar;
2287 delete [] Buffer_Send_Elem;
2288 delete [] Buffer_Send_Halo;
2289 delete [] Buffer_Recv_nAddedPeriodic;
2290 delete [] Buffer_Send_AddedPeriodic;
2291 delete [] Buffer_Recv_AddedPeriodic;
2292 delete [] Local_Halo;
2294 delete [] Buffer_Recv_nElem;
2295 delete [] Buffer_Recv_Elem;
2296 delete [] Buffer_Recv_Halo;
2297 delete [] Write_Elem;
2304 switch (Elem_Type) {
2306 nGlobal_Line = nElem_Total;
2307 if (nGlobal_Line > 0) Conn_Line = Conn_Elem;
2310 nGlobal_BoundTria = nElem_Total;
2311 if (nGlobal_BoundTria > 0) Conn_BoundTria = Conn_Elem;
2314 nGlobal_BoundQuad = nElem_Total;
2315 if (nGlobal_BoundQuad > 0) Conn_BoundQuad = Conn_Elem;
2328 unsigned short iVar = 0, jVar = 0, FirstIndex =
NONE, SecondIndex =
NONE, ThirdIndex =
NONE;
2329 unsigned short nVar_First = 0, nVar_Second = 0, nVar_Third = 0;
2330 unsigned short iVar_GridVel = 0, iVar_PressCp = 0, iVar_Lam = 0, iVar_MachMean = 0,
2331 iVar_ViscCoeffs = 0, iVar_HeatCoeffs = 0, iVar_Sens = 0, iVar_Extra = 0, iVar_Eddy = 0, iVar_Sharp = 0,
2332 iVar_FEA_Vel = 0, iVar_FEA_Accel = 0, iVar_FEA_Stress = 0, iVar_FEA_Stress_3D = 0,
2333 iVar_FEA_Extra = 0, iVar_SensDim = 0, iVar_Transp = 0;
2334 unsigned long iPoint = 0, jPoint = 0, iVertex = 0, iMarker = 0;
2335 su2double Gas_Constant, Mach2Vel, Mach_Motion, RefDensity, RefPressure = 0.0, factor = 0.0;
2337 su2double *Aux_Frict_x = NULL, *Aux_Frict_y = NULL, *Aux_Frict_z = NULL, *Aux_Heat = NULL, *Aux_yPlus = NULL, *Aux_Sens = NULL;
2339 unsigned short CurrentIndex;
2341 unsigned long Buffer_Send_nPoint[1], *Buffer_Recv_nPoint = NULL;
2342 unsigned long nLocalPoint = 0, MaxLocalPoint = 0;
2343 unsigned long iGlobal_Index = 0, nBuffer_Scalar = 0;
2344 bool Wrt_Halo = config->
GetWrt_Halo(), isPeriodic;
2365 unsigned short iDim;
2366 unsigned short nDim = geometry->
GetnDim();
2373 if (grid_movement) {
2377 RefVel2 = (Mach_Motion*Mach2Vel)*(Mach_Motion*Mach2Vel);
2381 for (iDim = 0; iDim < nDim; iDim++)
2386 factor = 1.0 / (0.5*RefDensity*RefArea*RefVel2);
2393 switch (Kind_Solver) {
2404 default: SecondIndex =
NONE; ThirdIndex =
NONE;
break;
2407 nVar_First = solver[FirstIndex]->
GetnVar();
2408 if (SecondIndex !=
NONE) nVar_Second = solver[SecondIndex]->
GetnVar();
2409 if (ThirdIndex !=
NONE) nVar_Third = solver[ThirdIndex]->
GetnVar();
2410 nVar_Consv = nVar_First + nVar_Second + nVar_Third;
2411 nVar_Total = nVar_Consv;
2425 if (grid_movement && !fem) {
2426 iVar_GridVel = nVar_Total;
2427 if (geometry->
GetnDim() == 2) nVar_Total += 2;
2428 else if (geometry->
GetnDim() == 3) nVar_Total += 3;
2436 iVar_PressCp = nVar_Total; nVar_Total += 3;
2437 iVar_MachMean = nVar_Total; nVar_Total += 1;
2444 iVar_Lam = nVar_Total;
2446 iVar_ViscCoeffs = nVar_Total;
2447 if (geometry->
GetnDim() == 2) nVar_Total += 2;
2448 else if (geometry->
GetnDim() == 3) nVar_Total += 3;
2449 iVar_HeatCoeffs = nVar_Total;
2456 iVar_Eddy = nVar_Total; nVar_Total += 1;
2464 iVar_Sharp = nVar_Total; nVar_Total += 1;
2472 iVar_Sens = nVar_Total; nVar_Total += 2;
2479 iVar_FEA_Vel = nVar_Total;
2480 if (geometry->
GetnDim() == 2) nVar_Total += 2;
2481 else if (geometry->
GetnDim() == 3) nVar_Total += 3;
2483 iVar_FEA_Accel = nVar_Total;
2484 if (geometry->
GetnDim() == 2) nVar_Total += 2;
2485 else if (geometry->
GetnDim() == 3) nVar_Total += 3;
2487 iVar_FEA_Stress = nVar_Total; nVar_Total += 3;
2488 if (geometry->
GetnDim() == 3) {iVar_FEA_Stress_3D = nVar_Total; nVar_Total += 3;}
2489 iVar_FEA_Extra = nVar_Total; nVar_Total += 1;
2495 iVar_Sens = nVar_Total; nVar_Total += 1;
2496 iVar_SensDim = nVar_Total; nVar_Total += nDim;
2502 iVar_Transp = nVar_Total;
2507 iVar_FEA_Extra = nVar_Total; nVar_Total += 2;
2511 if (Kind_Solver ==
RANS) {
2518 Local_Halo =
new int[geometry->
GetnPoint()];
2519 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
2529 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
2535 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
2539 if (isPeriodic) Local_Halo[iPoint] =
false;
2546 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
2547 if (Local_Halo[iPoint] ==
false)
2551 Buffer_Send_nPoint[0] = nLocalPoint;
2561 MaxLocalPoint = nLocalPoint;
2562 Buffer_Recv_nPoint[0] = Buffer_Send_nPoint[0];
2565 nBuffer_Scalar = MaxLocalPoint;
2578 unsigned long *Buffer_Send_GlobalIndex =
new unsigned long[MaxLocalPoint];
2579 unsigned long *Buffer_Recv_GlobalIndex = NULL;
2608 Buffer_Recv_GlobalIndex =
new unsigned long[
size*MaxLocalPoint];
2612 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
2613 nGlobal_Poin += Buffer_Recv_nPoint[iProcessor];
2616 for (iVar = 0; iVar < nVar_Total; iVar++) {
2617 Data[iVar] =
new su2double[nGlobal_Poin];
2627 for (iVar = 0; iVar < nVar_Consv; iVar++) {
2632 CurrentIndex = FirstIndex;
2633 if ((SecondIndex !=
NONE) && (iVar > nVar_First-1)) {
2634 jVar = iVar - nVar_First;
2635 CurrentIndex = SecondIndex;
2637 if ((SecondIndex !=
NONE) && (ThirdIndex !=
NONE) && (iVar > (nVar_First + nVar_Second-1))) {
2638 jVar = iVar - nVar_First - nVar_Second;
2639 CurrentIndex = ThirdIndex;
2645 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
2649 if (!Local_Halo[iPoint] || Wrt_Halo) {
2653 Buffer_Send_Var[jPoint] = solver[CurrentIndex]->
node[iPoint]->
GetSolution(jVar);
2663 Buffer_Send_Res[jPoint] = solver[CurrentIndex]->
LinSysRes.
GetBlock(iPoint, jVar);
2665 Buffer_Send_Res[jPoint] = solver[CurrentIndex]->
node[iPoint]->
GetSolution(jVar) -
2688 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Var[iPoint] = Buffer_Send_Var[iPoint];
2696 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Vol[iPoint] = Buffer_Send_Vol[iPoint];
2704 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Res[iPoint] = Buffer_Send_Res[iPoint];
2714 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_GlobalIndex[iPoint] = Buffer_Send_GlobalIndex[iPoint];
2722 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
2723 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
2727 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
2729 Data[iVar][iGlobal_Index] = Buffer_Recv_Var[jPoint];
2734 Data[iVar+nVar_Consv][iGlobal_Index] = Buffer_Recv_Vol[jPoint];
2738 unsigned short ExtraIndex;
2739 ExtraIndex = nVar_Consv;
2741 Data[iVar+ExtraIndex][iGlobal_Index] = Buffer_Recv_Res[jPoint];
2749 jPoint = (iProcessor+1)*nBuffer_Scalar;
2762 if (grid_movement && !fem) {
2767 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
2771 if (!Local_Halo[iPoint] || Wrt_Halo) {
2776 Buffer_Send_Var[jPoint] = Grid_Vel[0];
2777 Buffer_Send_Res[jPoint] = Grid_Vel[1];
2778 if (geometry->
GetnDim() == 3) Buffer_Send_Vol[jPoint] = Grid_Vel[2];
2788 if (geometry->
GetnDim() == 3) {
2792 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Var[iPoint] = Buffer_Send_Var[iPoint];
2793 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Res[iPoint] = Buffer_Send_Res[iPoint];
2794 if (geometry->
GetnDim() == 3) {
2795 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Vol[iPoint] = Buffer_Send_Vol[iPoint];
2802 jPoint = 0; iVar = iVar_GridVel;
2803 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
2804 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
2808 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
2809 Data[iVar][iGlobal_Index] = Buffer_Recv_Var[jPoint];
2810 Data[iVar+1][iGlobal_Index] = Buffer_Recv_Res[jPoint];
2812 Data[iVar+2][iGlobal_Index] = Buffer_Recv_Vol[jPoint];
2818 jPoint = (iProcessor+1)*nBuffer_Scalar;
2836 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
2840 if (!Local_Halo[iPoint] || Wrt_Halo) {
2848 Buffer_Send_Res[jPoint] = 0.0;
2863 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Var[iPoint] = Buffer_Send_Var[iPoint];
2864 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Res[iPoint] = Buffer_Send_Res[iPoint];
2865 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Vol[iPoint] = Buffer_Send_Vol[iPoint];
2871 jPoint = 0; iVar = iVar_PressCp;
2872 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
2873 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
2877 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
2878 Data[iVar][iGlobal_Index] = Buffer_Recv_Var[jPoint];
2879 Data[iVar+1][iGlobal_Index] = Buffer_Recv_Res[jPoint];
2880 Data[iVar+2][iGlobal_Index] = Buffer_Recv_Vol[jPoint];
2886 jPoint = (iProcessor+1)*nBuffer_Scalar;
2899 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
2903 if (!Local_Halo[iPoint] || Wrt_Halo) {
2908 Buffer_Send_Var[jPoint] = sqrt(solver[
FLOW_SOL]->node[iPoint]->GetVelocity2())/
2911 if (incompressible) {
2924 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Var[iPoint] = Buffer_Send_Var[iPoint];
2930 jPoint = 0; iVar = iVar_MachMean;
2931 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
2932 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
2936 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
2937 Data[iVar][iGlobal_Index] = Buffer_Recv_Var[jPoint];
2943 jPoint = (iProcessor+1)*nBuffer_Scalar;
2956 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
2960 if (!Local_Halo[iPoint] || Wrt_Halo) {
2975 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Res[iPoint] = Buffer_Send_Res[iPoint];
2981 jPoint = 0; iVar = iVar_Lam;
2982 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
2983 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
2987 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
2988 Data[iVar][iGlobal_Index] = Buffer_Recv_Res[jPoint];
2994 jPoint = (iProcessor+1)*nBuffer_Scalar;
3005 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
3006 Aux_Frict_x[iPoint] = 0.0;
3007 Aux_Frict_y[iPoint] = 0.0;
3008 Aux_Frict_z[iPoint] = 0.0;
3012 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
3016 if (geometry->
GetnDim() == 3) Aux_Frict_z[iPoint] = solver[
FLOW_SOL]->GetCSkinFriction(iMarker, iVertex, 2);
3023 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
3027 if (!Local_Halo[iPoint] || Wrt_Halo) {
3031 Buffer_Send_Var[jPoint] = Aux_Frict_x[iPoint];
3032 Buffer_Send_Res[jPoint] = Aux_Frict_y[iPoint];
3034 Buffer_Send_Vol[jPoint] = Aux_Frict_z[iPoint];
3044 if (geometry->
GetnDim() == 3) {
3048 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++)
3049 Buffer_Recv_Var[iPoint] = Buffer_Send_Var[iPoint];
3050 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++)
3051 Buffer_Recv_Res[iPoint] = Buffer_Send_Res[iPoint];
3052 if (geometry->
GetnDim() == 3) {
3053 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++)
3054 Buffer_Recv_Vol[iPoint] = Buffer_Send_Vol[iPoint];
3062 iVar = iVar_ViscCoeffs;
3063 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
3064 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
3068 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
3069 Data[iVar][iGlobal_Index] = Buffer_Recv_Var[jPoint];
3070 Data[iVar + 1][iGlobal_Index] = Buffer_Recv_Res[jPoint];
3072 Data[iVar + 2][iGlobal_Index] = Buffer_Recv_Vol[jPoint];
3078 jPoint = (iProcessor + 1) * nBuffer_Scalar;
3089 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
3090 Aux_Heat[iPoint] = 0.0;
3091 Aux_yPlus[iPoint] = 0.0;
3095 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
3105 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
3109 if (!Local_Halo[iPoint] || Wrt_Halo) {
3114 Buffer_Send_Res[jPoint] = Aux_Heat[iPoint];
3115 Buffer_Send_Vol[jPoint] = Aux_yPlus[iPoint];
3117 if (incompressible) {
3118 Buffer_Send_Res[jPoint] = Aux_Heat[iPoint];
3119 Buffer_Send_Vol[jPoint] = Aux_yPlus[iPoint];
3131 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++)
3132 Buffer_Recv_Res[iPoint] = Buffer_Send_Res[iPoint];
3133 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++)
3134 Buffer_Recv_Vol[iPoint] = Buffer_Send_Vol[iPoint];
3141 iVar = iVar_HeatCoeffs;
3143 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
3144 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
3148 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
3149 Data[iVar + 0][iGlobal_Index] = Buffer_Recv_Res[jPoint];
3150 Data[iVar + 1][iGlobal_Index] = Buffer_Recv_Vol[jPoint];
3156 jPoint = (iProcessor + 1) * nBuffer_Scalar;
3169 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
3173 if (!Local_Halo[iPoint] || Wrt_Halo) {
3188 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Var[iPoint] = Buffer_Send_Var[iPoint];
3194 jPoint = 0; iVar = iVar_Eddy;
3195 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
3196 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
3200 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
3201 Data[iVar][iGlobal_Index] = Buffer_Recv_Var[jPoint];
3207 jPoint = (iProcessor+1)*nBuffer_Scalar;
3222 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
3226 if (!Local_Halo[iPoint] || Wrt_Halo) {
3240 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Var[iPoint] = Buffer_Send_Var[iPoint];
3246 jPoint = 0; iVar = iVar_Sharp;
3247 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
3248 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
3252 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
3253 Data[iVar][iGlobal_Index] = Buffer_Recv_Var[jPoint];
3259 jPoint = (iProcessor+1)*nBuffer_Scalar;
3279 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) Aux_Sens[iPoint] = 0.0;
3282 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
3286 for (iDim = 0; iDim < nDim; iDim++) Area += Normal[iDim]*Normal[iDim];
3295 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
3299 if (!Local_Halo[iPoint] || Wrt_Halo) {
3303 Buffer_Send_Var[jPoint] = Aux_Sens[iPoint];
3320 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Var[iPoint] = Buffer_Send_Var[iPoint];
3322 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Res[iPoint] = Buffer_Send_Res[iPoint];
3328 jPoint = 0; iVar = iVar_Sens;
3329 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
3330 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
3334 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
3335 Data[iVar+0][iGlobal_Index] = Buffer_Recv_Var[jPoint];
3337 Data[iVar+1][iGlobal_Index] = Buffer_Recv_Res[jPoint];
3343 jPoint = (iProcessor+1)*nBuffer_Scalar;
3354 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
3358 if (!Local_Halo[iPoint] || Wrt_Halo) {
3378 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Var[iPoint] = Buffer_Send_Var[iPoint];
3379 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Res[iPoint] = Buffer_Send_Res[iPoint];
3381 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Vol[iPoint] = Buffer_Send_Vol[iPoint];
3387 jPoint = 0; iVar = iVar_SensDim;
3388 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
3389 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
3393 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
3394 Data[iVar+0][iGlobal_Index] = Buffer_Recv_Var[jPoint];
3395 Data[iVar+1][iGlobal_Index] = Buffer_Recv_Res[jPoint];
3397 Data[iVar+2][iGlobal_Index] = Buffer_Recv_Vol[jPoint];
3403 jPoint = (iProcessor+1)*nBuffer_Scalar;
3414 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
3418 if (!Local_Halo[iPoint] || Wrt_Halo) {
3431 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Var[iPoint] = Buffer_Send_Var[iPoint];
3437 jPoint = 0; iVar = iVar_Transp;
3438 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
3439 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
3443 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
3444 Data[iVar][iGlobal_Index] = Buffer_Recv_Var[jPoint];
3451 jPoint = (iProcessor+1)*nBuffer_Scalar;
3463 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
3467 if (!Local_Halo[iPoint] || Wrt_Halo) {
3472 Buffer_Send_Var[jPoint] = Node_Vel[0];
3473 Buffer_Send_Res[jPoint] = Node_Vel[1];
3474 if (geometry->
GetnDim() == 3) Buffer_Send_Vol[jPoint] = Node_Vel[2];
3484 if (geometry->
GetnDim() == 3) {
3488 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Var[iPoint] = Buffer_Send_Var[iPoint];
3489 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Res[iPoint] = Buffer_Send_Res[iPoint];
3490 if (geometry->
GetnDim() == 3) {
3491 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Vol[iPoint] = Buffer_Send_Vol[iPoint];
3498 jPoint = 0; iVar = iVar_FEA_Vel;
3499 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
3500 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
3504 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
3505 Data[iVar][iGlobal_Index] = Buffer_Recv_Var[jPoint];
3506 Data[iVar+1][iGlobal_Index] = Buffer_Recv_Res[jPoint];
3508 Data[iVar+2][iGlobal_Index] = Buffer_Recv_Vol[jPoint];
3514 jPoint = (iProcessor+1)*nBuffer_Scalar;
3526 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
3530 if (!Local_Halo[iPoint] || Wrt_Halo) {
3535 Buffer_Send_Var[jPoint] = Node_Accel[0];
3536 Buffer_Send_Res[jPoint] = Node_Accel[1];
3537 if (geometry->
GetnDim() == 3) Buffer_Send_Vol[jPoint] = Node_Accel[2];
3547 if (geometry->
GetnDim() == 3) {
3551 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Var[iPoint] = Buffer_Send_Var[iPoint];
3552 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Res[iPoint] = Buffer_Send_Res[iPoint];
3553 if (geometry->
GetnDim() == 3) {
3554 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Vol[iPoint] = Buffer_Send_Vol[iPoint];
3561 jPoint = 0; iVar = iVar_FEA_Accel;
3562 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
3563 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
3567 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
3568 Data[iVar][iGlobal_Index] = Buffer_Recv_Var[jPoint];
3569 Data[iVar+1][iGlobal_Index] = Buffer_Recv_Res[jPoint];
3571 Data[iVar+2][iGlobal_Index] = Buffer_Recv_Vol[jPoint];
3577 jPoint = (iProcessor+1)*nBuffer_Scalar;
3589 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
3593 if (!Local_Halo[iPoint] || Wrt_Halo) {
3599 Buffer_Send_Var[jPoint] = Stress[0];
3601 Buffer_Send_Res[jPoint] = Stress[1];
3603 Buffer_Send_Vol[jPoint] = Stress[2];
3615 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Var[iPoint] = Buffer_Send_Var[iPoint];
3616 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Res[iPoint] = Buffer_Send_Res[iPoint];
3617 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Vol[iPoint] = Buffer_Send_Vol[iPoint];
3623 jPoint = 0; iVar = iVar_FEA_Stress;
3624 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
3625 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
3629 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
3630 Data[iVar][iGlobal_Index] = Buffer_Recv_Var[jPoint];
3631 Data[iVar+1][iGlobal_Index] = Buffer_Recv_Res[jPoint];
3632 Data[iVar+2][iGlobal_Index] = Buffer_Recv_Vol[jPoint];
3638 jPoint = (iProcessor+1)*nBuffer_Scalar;
3650 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
3654 if (!Local_Halo[iPoint] || Wrt_Halo) {
3660 Buffer_Send_Var[jPoint] = Stress[3];
3662 Buffer_Send_Res[jPoint] = Stress[4];
3664 Buffer_Send_Vol[jPoint] = Stress[5];
3676 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Var[iPoint] = Buffer_Send_Var[iPoint];
3677 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Res[iPoint] = Buffer_Send_Res[iPoint];
3678 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Vol[iPoint] = Buffer_Send_Vol[iPoint];
3685 jPoint = 0; iVar = iVar_FEA_Stress_3D;
3686 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
3687 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
3691 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
3692 Data[iVar][iGlobal_Index] = Buffer_Recv_Var[jPoint];
3693 Data[iVar+1][iGlobal_Index] = Buffer_Recv_Res[jPoint];
3694 Data[iVar+2][iGlobal_Index] = Buffer_Recv_Vol[jPoint];
3700 jPoint = (iProcessor+1)*nBuffer_Scalar;
3712 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
3716 if (!Local_Halo[iPoint] || Wrt_Halo) {
3730 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Var[iPoint] = Buffer_Send_Var[iPoint];
3736 jPoint = 0; iVar = iVar_FEA_Extra;
3737 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
3738 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
3742 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
3743 Data[iVar][iGlobal_Index] = Buffer_Recv_Var[jPoint];
3749 jPoint = (iProcessor+1)*nBuffer_Scalar;
3758 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
3762 if (!Local_Halo[iPoint] || Wrt_Halo) {
3769 Buffer_Send_Vol[jPoint] = solver[
ADJFEA_SOL]->node[iPoint]->GetGeometry_CrossTerm_Derivative(2);
3782 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Var[iPoint] = Buffer_Send_Var[iPoint];
3783 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Res[iPoint] = Buffer_Send_Res[iPoint];
3785 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Vol[iPoint] = Buffer_Send_Vol[iPoint];
3791 jPoint = 0; iVar = iVar_FEA_Extra;
3792 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
3793 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
3797 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
3798 Data[iVar+0][iGlobal_Index] = Buffer_Recv_Var[jPoint];
3799 Data[iVar+1][iGlobal_Index] = Buffer_Recv_Res[jPoint];
3801 Data[iVar+2][iGlobal_Index] = Buffer_Recv_Vol[jPoint];
3807 jPoint = (iProcessor+1)*nBuffer_Scalar;
3814 for (jVar = 0; jVar < nVar_Extra; jVar++) {
3819 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
3823 if (!Local_Halo[iPoint] || Wrt_Halo) {
3827 if (Kind_Solver ==
RANS) {
3840 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Var[iPoint] = Buffer_Send_Var[iPoint];
3846 jPoint = 0; iVar = iVar_Extra;
3847 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
3848 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
3852 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
3853 Data[iVar+jVar][iGlobal_Index] = Buffer_Recv_Var[jPoint];
3859 jPoint = (iProcessor+1)*nBuffer_Scalar;
3869 delete [] Buffer_Send_Var;
3870 delete [] Buffer_Send_Res;
3871 delete [] Buffer_Send_Vol;
3872 delete [] Buffer_Send_GlobalIndex;
3874 delete [] Buffer_Recv_nPoint;
3875 delete [] Buffer_Recv_Var;
3876 delete [] Buffer_Recv_Res;
3877 delete [] Buffer_Recv_Vol;
3878 delete [] Buffer_Recv_GlobalIndex;
3883 delete [] Local_Halo;
3887 delete[] Aux_Frict_x;
delete[] Aux_Frict_y;
delete[] Aux_Frict_z;
3888 delete [] Aux_Heat;
delete [] Aux_yPlus;
3904 unsigned short iVar;
3905 unsigned long iPoint = 0, jPoint = 0;
3909 nVar_Total = config->
fields.size() - 1;
3919 unsigned short iMarker;
3920 unsigned long iVertex, nTotalPoints = 0;
3924 int *Local_Halo =
new int[geometry->
GetnPoint()];
3925 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
3928 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
3931 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
3936 Local_Halo[iPoint] =
false;
3945 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
3946 if (!Local_Halo[iPoint]) nTotalPoints++;
3948 nGlobal_Poin = nTotalPoints;
3950 for (iVar = 0; iVar < nVar_Total; iVar++) {
3951 Data[iVar] =
new su2double[nGlobal_Poin];
3958 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
3959 if (!Local_Halo[iPoint]) {
3963 unsigned short jVar = 0;
3964 for (iVar = 0; iVar < nVar_Total; iVar++) {
3981 int nProcessor =
size, iProcessor;
3985 unsigned long iVertex, iMarker;
3986 unsigned long Buffer_Send_nPoint[1], *Buffer_Recv_nPoint = NULL;
3987 unsigned long nLocalPoint = 0, MaxLocalPoint = 0;
3988 unsigned long iGlobal_Index = 0, nBuffer_Scalar = 0;
3990 int *Local_Halo =
new int[geometry->
GetnPoint()];
3991 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
3994 bool Wrt_Halo = config->
GetWrt_Halo(), isPeriodic;
4003 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
4009 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
4013 if (isPeriodic) Local_Halo[iPoint] =
false;
4020 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
4021 if (Local_Halo[iPoint] ==
false)
4025 Buffer_Send_nPoint[0] = nLocalPoint;
4027 if (
rank ==
MASTER_NODE) Buffer_Recv_nPoint =
new unsigned long[nProcessor];
4032 nBuffer_Scalar = MaxLocalPoint;
4039 unsigned long *Buffer_Send_GlobalIndex =
new unsigned long[MaxLocalPoint];
4040 unsigned long *Buffer_Recv_GlobalIndex = NULL;
4045 Buffer_Recv_Var =
new su2double[nProcessor*MaxLocalPoint];
4046 Buffer_Recv_GlobalIndex =
new unsigned long[nProcessor*MaxLocalPoint];
4050 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
4051 nGlobal_Poin += Buffer_Recv_nPoint[iProcessor];
4054 for (iVar = 0; iVar < nVar_Total; iVar++) {
4055 Data[iVar] =
new su2double[nGlobal_Poin];
4066 for (iVar = 0; iVar < nVar_Total; iVar++) {
4070 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
4073 if (!Local_Halo[iPoint] || Wrt_Halo) {
4096 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
4097 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
4100 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
4101 Data[iVar][iGlobal_Index] = Buffer_Recv_Var[jPoint];
4105 jPoint = (iProcessor+1)*nBuffer_Scalar;
4112 delete [] Buffer_Send_Var;
4113 delete [] Buffer_Send_GlobalIndex;
4115 delete [] Buffer_Recv_Var;
4116 delete [] Buffer_Recv_GlobalIndex;
4121 delete [] Local_Halo;
4129 unsigned short nZone = geometry->
GetnZone();
4131 unsigned short iVar, iDim, nDim = geometry->
GetnDim();
4132 unsigned long iPoint, iExtIter = config->
GetExtIter();
4137 ofstream restart_file;
4139 string filename, meta_filename;
4152 }
else if (disc_adj_fem){
4167 }
else if ((fem || disc_adj_fem) && (config->
GetWrt_Dynamic())) {
4173 restart_file.open(filename.c_str(), ios::out);
4174 restart_file.precision(15);
4178 restart_file <<
"\"PointID\"";
4183 restart_file <<
"\t\"x\"\t\"y\"";
4185 restart_file <<
"\t\"x\"\t\"y\"\t\"z\"";
4188 for (iVar = 0; iVar < nVar_Consv; iVar++) {
4190 restart_file <<
"\t\"Displacement_" << iVar+1<<
"\"";
4192 restart_file <<
"\t\"Conservative_" << iVar+1<<
"\"";
4198 for (iVar = 0; iVar < nVar_Consv; iVar++) {
4199 restart_file <<
"\t\"Limiter_" << iVar+1<<
"\"";
4203 for (iVar = 0; iVar < nVar_Consv; iVar++) {
4204 restart_file <<
"\t\"Residual_" << iVar+1<<
"\"";
4210 if (grid_movement && !fem) {
4212 restart_file <<
"\t\"Grid_Velx\"\t\"Grid_Vely\"";
4214 restart_file <<
"\t\"Grid_Velx\"\t\"Grid_Vely\"\t\"Grid_Velz\"";
4220 restart_file <<
"\t\"Pressure\"\t\"Temperature\"\t\"Pressure_Coefficient\"\t\"Mach\"";
4222 restart_file <<
"\t\"Pressure\"\t\"Temperature\"\t\"C<sub>p</sub>\"\t\"Mach\"";
4227 if (nDim == 2) restart_file <<
"\t\"Laminar_Viscosity\"\t\"Skin_Friction_Coefficient_X\"\t\"Skin_Friction_Coefficient_Y\"\t\"Heat_Flux\"\t\"Y_Plus\"";
4228 if (nDim == 3) restart_file <<
"\t\"Laminar_Viscosity\"\t\"Skin_Friction_Coefficient_X\"\t\"Skin_Friction_Coefficient_Y\"\t\"Skin_Friction_Coefficient_Z\"\t\"Heat_Flux\"\t\"Y_Plus\"";
4230 if (nDim == 2) restart_file <<
"\t\"<greek>m</greek>\"\t\"C<sub>f</sub>_x\"\t\"C<sub>f</sub>_y\"\t\"h\"\t\"y<sup>+</sup>\"";
4231 if (nDim == 3) restart_file <<
"\t\"<greek>m</greek>\"\t\"C<sub>f</sub>_x\"\t\"C<sub>f</sub>_y\"\t\"C<sub>f</sub>_z\"\t\"h\"\t\"y<sup>+</sup>\"";
4235 if (Kind_Solver ==
RANS) {
4237 restart_file <<
"\t\"Eddy_Viscosity\"";
4239 restart_file <<
"\t\"<greek>m</greek><sub>t</sub>\"";
4244 restart_file <<
"\t\"Sharp_Edge_Dist\"";
4251 restart_file <<
"\t\"Surface_Sensitivity\"\t\"Solution_Sensor\"";
4256 restart_file <<
"\t\"Surface_Sensitivity\"\t\"Sensitivity_x\"\t\"Sensitivity_y\"";
4257 if (geometry->
GetnDim() == 3) {
4258 restart_file <<
"\t\"Sensitivity_z\"";
4265 restart_file <<
"\t\"Sensitivity_Transp\"";
4271 restart_file <<
"\t\"Sxx\"\t\"Syy\"\t\"Sxy\"\t\"Von_Mises_Stress\"";
4273 restart_file <<
"\t\"Sxx\"\t\"Syy\"\t\"Sxy\"\t\"Szz\"\t\"Sxz\"\t\"Syz\"\t\"Von_Mises_Stress\"";
4275 else if (dynamic_fem) {
4276 if (geometry->
GetnDim() == 2) {
4277 restart_file <<
"\t\"Velocity_1\"\t\"Velocity_2\"\t\"Acceleration_1\"\t\"Acceleration_2\"";
4278 restart_file <<
"\t\"Sxx\"\t\"Syy\"\t\"Sxy\"\t\"Von_Mises_Stress\"";
4280 if (geometry->
GetnDim() == 3) {
4281 restart_file <<
"\t\"Velocity_1\"\t\"Velocity_2\"\t\"Velocity_3\"\t\"Acceleration_1\"\t\"Acceleration_2\"\t\"Acceleration_3\"";
4282 restart_file <<
"\t\"Sxx\"\t\"Syy\"\t\"Sxy\"\t\"Szz\"\t\"Sxz\"\t\"Syz\"\t\"Von_Mises_Stress\"";
4289 restart_file <<
"\t\"CrossTerm_1\"\t\"CrossTerm_2\"";
4291 restart_file <<
"\t\"CrossTerm_1\"\t\"CrossTerm_2\"\t\"CrossTerm_3\"";
4296 string *headings = NULL;
4301 for (iVar = 0; iVar < nVar_Extra; iVar++) {
4302 if (headings == NULL) {
4303 restart_file <<
"\t\"ExtraOutput_" << iVar+1<<
"\"";
4305 restart_file <<
"\t\""<< headings[iVar] <<
"\"";
4311 restart_file <<
"\n";
4322 unsigned long nPointTotal = 0;
4329 for (iPoint = 0; iPoint < nPointTotal; iPoint++) {
4332 restart_file << iPoint <<
"\t";
4335 for (iDim = 0; iDim < nDim; iDim++) {
4336 restart_file << scientific << Coords[iDim][iPoint] <<
"\t";
4340 for (iVar = 0; iVar < nVar_Total; iVar++) {
4341 restart_file << scientific << Data[iVar][iPoint] <<
"\t";
4343 restart_file <<
"\n";
4349 restart_file <<
"EXT_ITER= " << config->
GetExtIter() + 1 << endl;
4355 restart_file <<
"DCD_DCL_VALUE= " << config->
GetdCD_dCL() << endl;
4356 restart_file <<
"DCMX_DCL_VALUE= " << config->
GetdCMx_dCL() << endl;
4357 restart_file <<
"DCMY_DCL_VALUE= " << config->
GetdCMy_dCL() << endl;
4358 restart_file <<
"DCMZ_DCL_VALUE= " << config->
GetdCMz_dCL() << endl;
4363 restart_file.close();
4369 unsigned short iDim, nDim = geometry->
GetnDim();
4377 for (iDim = 0; iDim < nDim; iDim++) {
4378 delete [] Coords[iDim];
4391 if (nGlobal_Line > 0 && Conn_Line != NULL)
delete [] Conn_Line;
4392 if (nGlobal_BoundTria > 0 && Conn_BoundTria != NULL)
delete [] Conn_BoundTria;
4393 if (nGlobal_BoundQuad > 0 && Conn_BoundQuad != NULL)
delete [] Conn_BoundQuad;
4396 if (nGlobal_Tria > 0 && Conn_Tria != NULL)
delete [] Conn_Tria;
4397 if (nGlobal_Quad > 0 && Conn_Quad != NULL)
delete [] Conn_Quad;
4398 if (nGlobal_Tetr > 0 && Conn_Tetr != NULL)
delete [] Conn_Tetr;
4399 if (nGlobal_Hexa > 0 && Conn_Hexa != NULL)
delete [] Conn_Hexa;
4400 if (nGlobal_Pris > 0 && Conn_Pris != NULL)
delete [] Conn_Pris;
4401 if (nGlobal_Pyra > 0 && Conn_Pyra != NULL)
delete [] Conn_Pyra;
4414 for (
unsigned short iVar = 0; iVar < nVar_Total; iVar++) {
4415 delete [] Data[iVar];
4423 char cstr[200], buffer[50], turb_resid[1000], adj_turb_resid[1000];
4424 unsigned short iMarker_Monitoring;
4425 string Monitoring_Tag, monitoring_coeff, aeroelastic_coeff, turbo_coeff;
4441 bool output_comboObj = (config->
GetnObj() > 1);
4452 bool thermal =
false;
4467 strcpy (cstr, filename.data());
4476 strcat(cstr, buffer);
4484 strcat(cstr, buffer);
4486 ConvHist_file->open(cstr, ios::out);
4487 ConvHist_file->precision(15);
4491 char begin[]=
"\"Iteration\"";
4495 char flow_coeff[]=
",\"CL\",\"CD\",\"CSF\",\"CMx\",\"CMy\",\"CMz\",\"CFx\",\"CFy\",\"CFz\",\"CL/CD\",\"AoA\",\"Custom_ObjFunc\"";
4496 char heat_coeff[]=
",\"HeatFlux_Total\",\"HeatFlux_Maximum\",\"Temperature_Total\"";
4497 char equivalent_area_coeff[]=
",\"CEquivArea\",\"CNearFieldOF\"";
4498 char buffet_coeff[]=
",\"Buffet_Metric\"";
4499 char engine_coeff[]=
",\"NetThrust\",\"Power\",\"AeroCDrag\",\"SolidCDrag\",\"Radial_Distortion\",\"Circumferential_Distortion\"";
4500 char rotating_frame_coeff[]=
",\"CMerit\",\"CT\",\"CQ\"";
4501 char fem_coeff[]=
",\"VM_Stress\",\"Force_Coeff\"";
4502 char fem_incload[]=
",\"IncLoad\"";
4503 char adj_coeff[]=
",\"Sens_Geo\",\"Sens_Mach\",\"Sens_AoA\",\"Sens_Press\",\"Sens_Temp\",\"Sens_AoS\"";
4504 char adj_inc_coeff[]=
",\"Sens_Geo\",\"Sens_Vin\",\"Sens_Pout\",\"Sens_Temp\"";
4505 char adj_turbo_coeff[]=
",\"Sens_Geo\",\"Sens_PressOut\",\"Sens_TotTempIn\"";
4506 char surface_outputs[]=
",\"Avg_MassFlow\",\"Avg_Mach\",\"Avg_Temp\",\"Avg_Press\",\"Avg_Density\",\"Avg_Enthalpy\",\"Avg_NormalVel\",\"Uniformity\",\"Secondary_Strength\",\"Momentum_Distortion\",\"Secondary_Over_Uniformity\",\"Avg_TotalTemp\",\"Avg_TotalPress\",\"Pressure_Drop\"";
4507 char Cp_inverse_design[]=
",\"Cp_Diff\"";
4508 char Heat_inverse_design[]=
",\"HeatFlux_Diff\"";
4509 char d_flow_coeff[] =
",\"D(CL)\",\"D(CD)\",\"D(CSF)\",\"D(CMx)\",\"D(CMy)\",\"D(CMz)\",\"D(CFx)\",\"D(CFy)\",\"D(CFz)\",\"D(CL/CD)\",\"D(Custom_ObjFunc)\"";
4510 char d_thermal_coeff[] =
",\"D(HeatFlux_Total)\",\"D(HeatFlux_Maximum)\"";
4511 char d_engine[] =
",\"D(NetThrust)\",\"D(Power)\",\"D(AeroCDrag)\",\"D(SolidCDrag)\",\"D(Radial_Distortion)\",\"D(Circumferential_Distortion)\"";
4512 char d_turbo_coeff[] =
",\"D(TotalPressureLoss_0)\",\"D(FlowAngleOut_0)\",\"D(TotalEfficency)\",\"D(TotalStaticEfficiency)\", \"D(EntropyGen)\"";
4513 char d_surface_outputs[]=
",\"D(Uniformity)\",\"D(Secondary_Strength)\",\"D(Momentum_Distortion)\",\"D(Secondary_Over_Uniformity)\",\"D(Pressure_Drop)\"";
4514 char transp_coeff[]=
", \"Cmu\"";
4518 for (iMarker_Monitoring = 0; iMarker_Monitoring < config->
GetnMarker_Monitoring(); iMarker_Monitoring++) {
4520 monitoring_coeff +=
",\"CL_" + Monitoring_Tag +
"\"";
4521 monitoring_coeff +=
",\"CD_" + Monitoring_Tag +
"\"";
4522 monitoring_coeff +=
",\"CSF_" + Monitoring_Tag +
"\"";
4523 monitoring_coeff +=
",\"CL/CD_" + Monitoring_Tag +
"\"";
4524 monitoring_coeff +=
",\"CFx_" + Monitoring_Tag +
"\"";
4525 monitoring_coeff +=
",\"CFy_" + Monitoring_Tag +
"\"";
4526 monitoring_coeff +=
",\"CFz_" + Monitoring_Tag +
"\"";
4527 monitoring_coeff +=
",\"CMx_" + Monitoring_Tag +
"\"";
4528 monitoring_coeff +=
",\"CMy_" + Monitoring_Tag +
"\"";
4529 monitoring_coeff +=
",\"CMz_" + Monitoring_Tag +
"\"";
4530 if(buffet) monitoring_coeff +=
",\"Buffet_Metric_" + Monitoring_Tag +
"\"";
4531 aeroelastic_coeff +=
",\"plunge_" + Monitoring_Tag +
"\"";
4532 aeroelastic_coeff +=
",\"pitch_" + Monitoring_Tag +
"\"";
4539 tag << iMarker_Monitoring + 1;
4541 turbo_coeff +=
",\"TotalPressureLoss_" + tag.str() +
"\"";
4542 turbo_coeff +=
",\"KineticEnergyLoss_" + tag.str() +
"\"";
4543 turbo_coeff +=
",\"EntropyGen_" + tag.str() +
"\"";
4544 turbo_coeff +=
",\"EulerianWork_" + tag.str() +
"\"";
4545 turbo_coeff +=
",\"PressureRatio_" + tag.str() +
"\"";
4546 turbo_coeff +=
",\"FlowAngleIn_" + tag.str() +
"\"";
4547 turbo_coeff +=
",\"FlowAngleOut_" + tag.str() +
"\"";
4548 turbo_coeff +=
",\"AbsFlowAngleIn_" + tag.str() +
"\"";
4549 turbo_coeff +=
",\"AbsFlowAngleOut_" + tag.str() +
"\"";
4550 turbo_coeff +=
",\"MassFlowIn_" + tag.str() +
"\"";
4551 turbo_coeff +=
",\"MassFlowOut_" + tag.str() +
"\"";
4552 turbo_coeff +=
",\"MachIn_" + tag.str() +
"\"";
4553 turbo_coeff +=
",\"MachOut_" + tag.str() +
"\"";
4555 turbo_coeff +=
",\"TotalEfficiency_" + tag.str() +
"\"";
4556 turbo_coeff +=
",\"TotalStaticEfficiency_" + tag.str() +
"\"";
4561 char combo_obj[] =
",\"ComboObj\"";
4565 char flow_resid[]=
",\"Res_Flow[0]\",\"Res_Flow[1]\",\"Res_Flow[2]\",\"Res_Flow[3]\",\"Res_Flow[4]\"";
4566 char adj_flow_resid[]=
",\"Res_AdjFlow[0]\",\"Res_AdjFlow[1]\",\"Res_AdjFlow[2]\",\"Res_AdjFlow[3]\",\"Res_AdjFlow[4]\"";
4569 SPRINTF (turb_resid,
",\"Res_Turb[0]\"");
4571 case SST:
SPRINTF (turb_resid,
",\"Res_Turb[0]\",\"Res_Turb[1]\"");
break;
4575 SPRINTF (adj_turb_resid,
",\"Res_AdjTurb[0]\"");
4577 case SST:
SPRINTF (adj_turb_resid,
",\"Res_AdjTurb[0]\",\"Res_AdjTurb[1]\"");
break;
4579 char fem_resid[]=
",\"Res_FEM[0]\",\"Res_FEM[1]\",\"Res_FEM[2]\"";
4580 char heat_resid[]=
",\"Res_Heat\"";
4584 char end[]=
",\"Linear_Solver_Iterations\",\"CFL_Number\",\"Time(min)\"\n";
4585 char endfea[]=
",\"Linear_Solver_Iterations\",\"Time(min)\"\n";
4591 ConvHist_file[0] <<
"TITLE = \"SU2 Simulation\"" << endl;
4592 ConvHist_file[0] <<
"VARIABLES = ";
4601 ConvHist_file[0] << begin;
4602 if (!turbo) ConvHist_file[0] << flow_coeff;
4603 if (transp) ConvHist_file[0] << transp_coeff;
4604 if (buffet) ConvHist_file[0] << buffet_coeff;
4605 if (turbo) ConvHist_file[0] << turbo_coeff;
4606 if (thermal && !turbo) ConvHist_file[0] << heat_coeff;
4607 if (equiv_area) ConvHist_file[0] << equivalent_area_coeff;
4608 if (engine || actuator_disk) ConvHist_file[0] << engine_coeff;
4610 ConvHist_file[0] << Cp_inverse_design;
4611 if (thermal && !turbo) ConvHist_file[0] << Heat_inverse_design;
4613 if (rotating_frame && !turbo) ConvHist_file[0] << rotating_frame_coeff;
4614 ConvHist_file[0] << flow_resid;
4615 if (turbulent) ConvHist_file[0] << turb_resid;
4616 if (weakly_coupled_heat) ConvHist_file[0] << heat_resid;
4617 if (aeroelastic) ConvHist_file[0] << aeroelastic_coeff;
4618 if (output_per_surface) ConvHist_file[0] << monitoring_coeff;
4619 if (output_surface) ConvHist_file[0] << surface_outputs;
4621 if (!turbo) ConvHist_file[0] << d_flow_coeff;
4622 else ConvHist_file[0] << d_turbo_coeff;
4623 if (engine || actuator_disk) ConvHist_file[0] << d_engine;
4624 if (thermal) ConvHist_file[0] << d_thermal_coeff;
4625 if (output_surface) ConvHist_file[0] << d_surface_outputs;
4627 if (output_comboObj) ConvHist_file[0] << combo_obj;
4628 ConvHist_file[0] << end;
4636 ConvHist_file[0] << begin << adj_coeff << adj_flow_resid;
4638 if (incompressible) {
4639 ConvHist_file[0] << begin << adj_inc_coeff << adj_flow_resid;
4642 else ConvHist_file[0] << begin << adj_turbo_coeff << adj_flow_resid;
4643 if ((turbulent) && (!frozen_visc)) ConvHist_file[0] << adj_turb_resid;
4644 ConvHist_file[0] << end;
4648 ConvHist_file[0] << begin << heat_coeff;
4649 ConvHist_file[0] << heat_resid << end;
4653 ConvHist_file[0] << begin << fem_coeff;
4654 if (incload) ConvHist_file[0] << fem_incload;
4655 ConvHist_file[0] << fem_resid << endfea;
4659 ConvHist_file[0] << begin << fem_coeff;
4660 ConvHist_file[0] << fem_resid << endfea;
4669 ConvHist_file[0] <<
"ZONE T= \"Convergence history\"" << endl;
4677 CSolver *****solver_container,
4680 bool DualTime_Iteration,
4682 unsigned short val_iZone,
4683 unsigned short val_iInst) {
4686 bool output_comboObj = (config[val_iZone]->
GetnObj() > 1);
4689 unsigned long iIntIter = config[val_iZone]->
GetIntIter();
4690 unsigned long iExtIter = config[val_iZone]->
GetExtIter();
4691 unsigned short FinestMesh = config[val_iZone]->
GetFinestMesh();
4692 unsigned short nZone = config[val_iZone]->
GetnZone();
4698 bool output_files =
true;
4703 if (!disc_adj && !cont_adj && !DualTime_Iteration) {
4705 if ((config[val_iZone]->GetFixed_CL_Mode()) &&
4706 (config[val_iZone]->GetnExtIter()-config[val_iZone]->
GetIter_dCL_dAlpha() - 1 < iExtIter)) {
4707 output_files =
false;
4710 if (fea || fluid_structure) output_files =
false;
4714 if (((iExtIter % (config[val_iZone]->GetWrt_Sol_Freq())) == 0) ||
4715 ((!config[val_iZone]->GetFixed_CL_Mode()) && (iExtIter == (config[val_iZone]->GetnExtIter()-1))) ||
4717 ((config[val_iZone]->GetFixed_CL_Mode()) && (iExtIter == (config[val_iZone]->GetnExtIter()-2))) ||
4718 ((config[val_iZone]->GetFixed_CL_Mode()) && (config[val_iZone]->GetnExtIter()-config[val_iZone]->
GetIter_dCL_dAlpha() - 1 == iExtIter))) {
4721 if ((
rank ==
MASTER_NODE) && output_files) cout << endl <<
"------------------------ Evaluate Special Output ------------------------";
4723 switch (config[val_iZone]->GetKind_Solver()) {
4729 if (config[val_iZone]->GetnMarker_Analyze() != 0) {
4731 geometry[val_iZone][val_iInst][
MESH_0], config[val_iZone], output_files);
4736 if ((config[val_iZone]->GetnMarker_Analyze() != 0) && compressible) {
4738 geometry[val_iZone][val_iInst][
MESH_0], config[val_iZone], output_files);
4743 if (config[val_iZone]->GetnMarker_NearFieldBound() != 0) {
4745 geometry[val_iZone][val_iInst][
MESH_0], config[val_iZone], output_files);
4750 if (config[val_iZone]->GetPlot_Section_Forces()) {
4752 geometry[val_iZone][val_iInst][
MESH_0], config[val_iZone], output_files);
4766 if (config[val_iZone]->GetBoolTurbomachinery()) {
4774 if ((
rank ==
MASTER_NODE) && output_files) cout <<
"-------------------------------------------------------------------------" << endl << endl;
4786 if (output_comboObj) {
4788 switch (config[val_iZone]->GetKind_Solver()) {
4803 char begin[1000], direct_coeff[1000], heat_coeff[1000], equivalent_area_coeff[1000], engine_coeff[1000], rotating_frame_coeff[1000], Cp_inverse_design[1000], Heat_inverse_design[1000], surface_coeff[1000], aeroelastic_coeff[1000], monitoring_coeff[10000], buffet_coeff[1000],
4804 adjoint_coeff[1000], flow_resid[1000], adj_flow_resid[1000], turb_resid[1000], trans_resid[1000],
4805 adj_turb_resid[1000],
4806 begin_fem[1000], fem_coeff[1000], heat_resid[1000], combo_obj[1000],
4807 fem_resid[1000], end[1000], end_fem[1000], surface_outputs[1000], d_surface_outputs[1000], d_direct_coeff[1000], turbo_coeff[10000],
4812 unsigned short iVar, iMarker_Monitoring;
4814 unsigned long LinSolvIter = 0, iPointMaxResid;
4817 unsigned short nDim = geometry[val_iZone][val_iInst][FinestMesh]->
GetnDim();
4823 bool engine = ((config[val_iZone]->
GetnMarker_EngineInflow() != 0) || (config[val_iZone]->GetnMarker_EngineExhaust() != 0));
4824 bool actuator_disk = ((config[val_iZone]->
GetnMarker_ActDiskInlet() != 0) || (config[val_iZone]->GetnMarker_ActDiskOutlet() != 0));
4830 bool adjoint = cont_adj || disc_adj;
4831 bool frozen_visc = (cont_adj && config[val_iZone]->
GetFrozen_Visc_Cont()) ||( disc_adj && config[val_iZone]->GetFrozen_Visc_Disc());
4835 (config[val_iZone]->GetKind_Solver() ==
RANS) || (config[val_iZone]->GetKind_Solver() ==
FEM_EULER) || (config[val_iZone]->GetKind_Solver() ==
FEM_NAVIER_STOKES) || (config[val_iZone]->GetKind_Solver() ==
FEM_RANS) || (config[val_iZone]->GetKind_Solver() ==
FEM_LES) || (config[val_iZone]->GetKind_Solver() ==
ADJ_EULER) ||
4840 (config[val_iZone]->GetKind_Solver() ==
DISC_ADJ_FEM));
4854 unsigned short direct_diff = config[val_iZone]->
GetDirectDiff();
4857 bool extra_heat_output =
false;
4862 if (ExtraHeatOutputZone > -1) {
4863 if (ExtraHeatOutputZone > nZone) {
4866 else if ((config[ExtraHeatOutputZone]->GetKind_Solver() !=
HEAT_EQUATION_FVM)) {
4870 extra_heat_output =
true;
4876 su2double Total_CL = 0.0, Total_CD = 0.0, Total_CSF = 0.0, Total_CMx = 0.0, Total_CMy = 0.0, Total_CMz = 0.0, Total_CEff = 0.0,
4877 Total_CEquivArea = 0.0, Total_CNearFieldOF = 0.0, Total_CFx = 0.0, Total_CFy = 0.0, Total_CFz = 0.0, Total_CMerit = 0.0,
4878 Total_CT = 0.0, Total_CQ = 0.0,
4879 Total_Heat = 0.0, Total_MaxHeat = 0.0, Total_Temperature = 0.0, Total_Custom_ObjFunc = 0.0,
4880 Total_ComboObj = 0.0, Total_NetThrust = 0.0, Total_Power = 0.0, Total_AeroCD = 0.0, Total_SolidCD = 0.0, Total_IDR = 0.0, Total_IDC = 0.0,
4881 Total_AoA = 0.0, Total_Buffet_Metric = 0.0;
4882 su2double Surface_MassFlow = 0.0, Surface_Mach = 0.0, Surface_Temperature = 0.0, Surface_Pressure = 0.0, Surface_Density = 0.0, Surface_Enthalpy = 0.0, Surface_NormalVelocity = 0.0, Surface_TotalTemperature = 0.0, Surface_TotalPressure = 0.0, Surface_Uniformity = 0.0, Surface_SecondaryStrength = 0.0,Surface_MomentumDistortion = 0.0, Surface_SecondOverUniform = 0.0, Surface_PressureDrop = 0.0;
4884 su2double Total_ForceCoeff = 0.0, Total_VMStress = 0.0, Total_IncLoad = 0.0;
4885 su2double Total_SensE = 0.0, Total_SensNu = 0.0;
4888 unsigned short iSpan;
4891 su2double Total_Sens_Geo = 0.0, Total_Sens_Mach = 0.0, Total_Sens_AoA = 0.0;
4892 su2double Total_Sens_Press = 0.0, Total_Sens_Temp = 0.0;
4898 su2double D_Total_CL = 0.0, D_Total_CD = 0.0, D_Total_CSF = 0.0, D_Total_CMx = 0.0, D_Total_CMy = 0.0, D_Total_CMz = 0.0, D_Total_CEff = 0.0, D_Total_CFx = 0.0,
4899 D_Total_CFy = 0.0, D_Total_CFz = 0.0, D_Total_NetThrust = 0.0, D_Total_Power = 0.0, D_Total_AeroCD = 0.0, D_Total_SolidCD = 0.0, D_Total_IDR = 0.0, D_Total_IDC = 0.0, D_Total_Custom_ObjFunc = 0.0, D_Total_Heat = 0.0, D_Total_MaxHeat = 0.0,
4900 D_TotalPressure_Loss = 0.0, D_FlowAngle_Out = 0.0, D_TotalStaticEfficiency = 0.0,
4901 D_TotalTotalEfficiency = 0.0, D_EntropyGen = 0.0,
4902 D_Surface_Uniformity = 0.0, D_Surface_SecondaryStrength = 0.0, D_Surface_MomentumDistortion = 0.0, D_Surface_SecondOverUniform = 0.0, D_Surface_PressureDrop = 0.0;
4906 *residual_turbulent = NULL,
4907 *residual_transition = NULL;
4909 *residual_adjturbulent = NULL;
4916 *aeroelastic_pitch = NULL,
4919 *Surface_CSF = NULL,
4920 *Surface_CEff = NULL,
4921 *Surface_CFx = NULL,
4922 *Surface_CFy = NULL,
4923 *Surface_CFz = NULL,
4924 *Surface_CMx = NULL,
4925 *Surface_CMy = NULL,
4926 *Surface_CMz = NULL,
4927 *Surface_Buffet_Metric = NULL;
4930 unsigned short nVar_Flow = 0, nVar_Turb = 0,
4931 nVar_Trans = 0, nVar_Heat = 0,
4932 nVar_AdjFlow = 0, nVar_AdjTurb = 0,
4936 if (compressible) nVar_Flow = nDim+2;
else nVar_Flow = nDim+2;
4938 switch (config[val_iZone]->GetKind_Turb_Model()) {
4940 case SST: nVar_Turb = 2;
break;
4943 if (transition) nVar_Trans = 2;
4944 if (heat) nVar_Heat = 1;
4947 if (linear_analysis) nVar_FEM = nDim;
4948 if (nonlinear_analysis) nVar_FEM = 3;
4950 if (config[val_iZone]->GetKind_Solver() ==
DISC_ADJ_FEM) nVar_FEM = nDim;
4955 if (compressible) nVar_AdjFlow = nDim+2;
else nVar_AdjFlow = nDim+2;
4957 switch (config[val_iZone]->GetKind_Turb_Model()) {
4959 case SST: nVar_AdjTurb = 2;
break;
4964 residual_flow =
new su2double[nVar_Flow];
4965 residual_turbulent =
new su2double[nVar_Turb];
4966 residual_transition =
new su2double[nVar_Trans];
4967 residual_heat =
new su2double[nVar_Heat];
4970 residual_adjflow =
new su2double[nVar_AdjFlow];
4971 residual_adjturbulent =
new su2double[nVar_AdjTurb];
4975 aeroelastic_pitch =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
4979 Surface_CEff =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
4986 if(buffet) Surface_Buffet_Metric =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
4990 switch (config[val_iZone]->GetKind_Solver()) {
5010 Total_AoA = config[val_iZone]->GetAoA() - config[val_iZone]->GetAoA_Offset();
5019 if(weakly_coupled_heat) {
5049 if (engine || actuator_disk) {
5064 Total_CEquivArea = config[val_iZone]->GetWeightCd()*Total_CD + (1.0-config[val_iZone]->GetWeightCd())*Total_CEquivArea;
5065 Total_CNearFieldOF = config[val_iZone]->GetWeightCd()*Total_CD + (1.0-config[val_iZone]->GetWeightCd())*Total_CNearFieldOF;
5068 if (engine || actuator_disk) {
5077 if (rotating_frame) {
5085 for (iMarker_Monitoring = 0; iMarker_Monitoring < config[
ZONE_0]->GetnMarker_Monitoring(); iMarker_Monitoring++) {
5086 aeroelastic_plunge[iMarker_Monitoring] = config[val_iZone]->GetAeroelastic_plunge(iMarker_Monitoring);
5087 aeroelastic_pitch[iMarker_Monitoring] = config[val_iZone]->GetAeroelastic_pitch(iMarker_Monitoring);
5091 if (output_per_surface) {
5093 for (iMarker_Monitoring = 0; iMarker_Monitoring < config[
ZONE_0]->GetnMarker_Monitoring(); iMarker_Monitoring++) {
5094 Surface_CL[iMarker_Monitoring] = solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetSurface_CL(iMarker_Monitoring);
5095 Surface_CD[iMarker_Monitoring] = solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetSurface_CD(iMarker_Monitoring);
5096 Surface_CSF[iMarker_Monitoring] = solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetSurface_CSF(iMarker_Monitoring);
5097 Surface_CEff[iMarker_Monitoring] = solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetSurface_CEff(iMarker_Monitoring);
5098 Surface_CFx[iMarker_Monitoring] = solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetSurface_CFx(iMarker_Monitoring);
5099 Surface_CFy[iMarker_Monitoring] = solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetSurface_CFy(iMarker_Monitoring);
5100 Surface_CFz[iMarker_Monitoring] = solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetSurface_CFz(iMarker_Monitoring);
5101 Surface_CMx[iMarker_Monitoring] = solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetSurface_CMx(iMarker_Monitoring);
5102 Surface_CMy[iMarker_Monitoring] = solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetSurface_CMy(iMarker_Monitoring);
5103 Surface_CMz[iMarker_Monitoring] = solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetSurface_CMz(iMarker_Monitoring);
5105 if(buffet) Surface_Buffet_Metric[iMarker_Monitoring] = solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetSurface_Buffet_Metric(iMarker_Monitoring);
5111 for (iMarker_Monitoring = 0; iMarker_Monitoring < nTurboPerf; iMarker_Monitoring++) {
5112 for(iSpan=0; iSpan<nSpanWiseSections+1; iSpan++){
5113 if ((iMarker_Monitoring == 0) && (direct_diff !=
NO_DERIVATIVE)){
5128 if (output_surface) {
5130 unsigned short iMarker_Analyze = 0;
5131 Surface_MassFlow = config[
ZONE_0]->GetSurface_MassFlow(iMarker_Analyze);
5132 Surface_Mach = config[
ZONE_0]->GetSurface_Mach(iMarker_Analyze);
5133 Surface_Temperature = config[
ZONE_0]->GetSurface_Temperature(iMarker_Analyze);
5134 Surface_Pressure = config[
ZONE_0]->GetSurface_Pressure(iMarker_Analyze);
5135 Surface_Density = config[
ZONE_0]->GetSurface_Density(iMarker_Analyze);
5136 Surface_Enthalpy = config[
ZONE_0]->GetSurface_Enthalpy(iMarker_Analyze);
5137 Surface_NormalVelocity = config[
ZONE_0]->GetSurface_NormalVelocity(iMarker_Analyze);
5138 Surface_Uniformity = config[
ZONE_0]->GetSurface_Uniformity(iMarker_Analyze);
5139 Surface_SecondaryStrength = config[
ZONE_0]->GetSurface_SecondaryStrength(iMarker_Analyze);
5140 Surface_MomentumDistortion = config[
ZONE_0]->GetSurface_MomentumDistortion(iMarker_Analyze);
5141 Surface_SecondOverUniform = config[
ZONE_0]->GetSurface_SecondOverUniform(iMarker_Analyze);
5142 Surface_TotalTemperature = config[
ZONE_0]->GetSurface_TotalTemperature(iMarker_Analyze);
5143 Surface_TotalPressure = config[
ZONE_0]->GetSurface_TotalPressure(iMarker_Analyze);
5144 Surface_PressureDrop = config[
ZONE_0]->GetSurface_PressureDrop(iMarker_Analyze);
5157 for (iVar = 0; iVar < nVar_Flow; iVar++)
5158 residual_flow[iVar] = solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->GetRes_RMS(iVar);
5163 for (iVar = 0; iVar < nVar_Turb; iVar++)
5164 residual_turbulent[iVar] = solver_container[val_iZone][val_iInst][FinestMesh][
TURB_SOL]->GetRes_RMS(iVar);
5167 if (weakly_coupled_heat) {
5168 for (iVar = 0; iVar < nVar_Heat; iVar++) {
5169 residual_heat[iVar] = solver_container[val_iZone][val_iInst][FinestMesh][
HEAT_SOL]->
GetRes_RMS(iVar);
5177 for (iVar = 0; iVar < nVar_Trans; iVar++)
5178 residual_transition[iVar] = solver_container[val_iZone][val_iInst][FinestMesh][
TRANS_SOL]->GetRes_RMS(iVar);
5190 LinSolvIter = (
unsigned long) solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->GetIterLinSolver();
5208 for (iVar = 0; iVar < nVar_AdjFlow; iVar++) {
5209 residual_adjflow[iVar] = solver_container[val_iZone][val_iInst][FinestMesh][
ADJFLOW_SOL]->
GetRes_RMS(iVar);
5216 for (iVar = 0; iVar < nVar_AdjTurb; iVar++)
5217 residual_adjturbulent[iVar] = solver_container[val_iZone][val_iInst][FinestMesh][
ADJTURB_SOL]->GetRes_RMS(iVar);
5236 for (iVar = 0; iVar < nVar_Heat; iVar++) {
5237 residual_heat[iVar] = solver_container[val_iZone][val_iInst][FinestMesh][
HEAT_SOL]->
GetRes_RMS(iVar);
5248 Total_ForceCoeff = solver_container[val_iZone][val_iInst][FinestMesh][
FEA_SOL]->
GetForceCoeff();
5252 LinSolvIter = (
unsigned long) solver_container[val_iZone][val_iInst][FinestMesh][
FEA_SOL]->GetIterLinSolver();
5258 if (linear_analysis) {
5259 for (iVar = 0; iVar < nVar_FEM; iVar++) {
5260 residual_fem[iVar] = solver_container[val_iZone][val_iInst][FinestMesh][
FEA_SOL]->
GetRes_RMS(iVar);
5263 else if (nonlinear_analysis) {
5264 for (iVar = 0; iVar < nVar_FEM; iVar++) {
5265 residual_fem[iVar] = solver_container[val_iZone][val_iInst][FinestMesh][
FEA_SOL]->
GetRes_FEM(iVar);
5280 for (iVar = 0; iVar < nVar_FEM; iVar++) {
5281 residual_fem[iVar] = solver_container[val_iZone][val_iInst][FinestMesh][
ADJFEA_SOL]->
GetRes_RMS(iVar);
5289 if (extra_heat_output) {
5292 Extra_Heat_Residual = log10(solver_container[ExtraHeatOutputZone][val_iInst][FinestMesh][
HEAT_SOL]->GetRes_RMS(0));
5297 bool Unsteady = ((config[val_iZone]->GetUnsteady_Simulation() ==
DT_STEPPING_1ST) ||
5299 bool In_NoDualTime = (!DualTime_Iteration && (iExtIter % config[val_iZone]->GetWrt_Con_Freq() == 0));
5300 bool In_DualTime_0 = (DualTime_Iteration && (iIntIter % config[val_iZone]->GetWrt_Con_Freq_DualTime() == 0));
5301 bool In_DualTime_1 = (!DualTime_Iteration && Unsteady);
5302 bool In_DualTime_2 = (Unsteady && DualTime_Iteration && (iExtIter % config[val_iZone]->GetWrt_Con_Freq() == 0));
5303 bool In_DualTime_3 = (Unsteady && !DualTime_Iteration && (iExtIter % config[val_iZone]->GetWrt_Con_Freq() == 0));
5310 bool dynamic = (config[val_iZone]->GetDynamic_Analysis() ==
DYNAMIC);
5311 bool In_NoDynamic = (!DualTime_Iteration && (iExtIter % config[val_iZone]->GetWrt_Con_Freq() == 0));
5312 bool In_Dynamic_0 = (DualTime_Iteration && (iIntIter % config[val_iZone]->GetWrt_Con_Freq_DualTime() == 0));
5313 bool In_Dynamic_1 = (!DualTime_Iteration && nonlinear_analysis);
5314 bool In_Dynamic_2 = (nonlinear_analysis && DualTime_Iteration && (iExtIter % config[val_iZone]->GetWrt_Con_Freq() == 0));
5315 bool In_Dynamic_3 = (nonlinear_analysis && !DualTime_Iteration && (iExtIter % config[val_iZone]->GetWrt_Con_Freq() == 0));
5318 if (Unsteady) write_heads = (iIntIter == 0);
5319 else write_heads = (((iExtIter % (config[val_iZone]->GetWrt_Con_Freq()*40)) == 0));
5321 bool write_turbo = (((iExtIter % (config[val_iZone]->GetWrt_Con_Freq()*40)) == 0) || (iExtIter == (config[val_iZone]->GetnExtIter() -1)));
5324 bool write_heads_FEM;
5325 if (nonlinear_analysis) write_heads_FEM = (iIntIter == 0);
5326 else write_heads_FEM = (((iExtIter % (config[val_iZone]->GetWrt_Con_Freq()*40)) == 0));
5328 if ( (!fem && ((In_NoDualTime || In_DualTime_0 || In_DualTime_1) && (In_NoDualTime || In_DualTime_2 || In_DualTime_3))) ||
5329 (fem && ( (In_NoDynamic || In_Dynamic_0 || In_Dynamic_1) && (In_NoDynamic || In_Dynamic_2 || In_Dynamic_3)))
5335 if (!DualTime_Iteration) {
5341 SPRINTF (end,
", %12.10f, %12.10f, %12.10f\n",
su2double(LinSolvIter), config[val_iZone]->GetCFL(
MESH_0), timeused/60.0);
5344 switch (config[val_iZone]->GetKind_Solver()) {
5352 SPRINTF (direct_coeff,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e",
5353 Total_CL, Total_CD, Total_CSF, Total_CMx, Total_CMy, Total_CMz, Total_CFx, Total_CFy,
5354 Total_CFz, Total_CEff, Total_AoA, Total_Custom_ObjFunc);
5355 if (transp)
SPRINTF(transp_coeff,
", %14.8e", Total_Cmu);
5356 if (buffet)
SPRINTF (buffet_coeff,
", %14.8e", Total_Buffet_Metric);
5357 if (thermal || heat)
SPRINTF (heat_coeff,
", %14.8e, %14.8e, %14.8e", Total_Heat, Total_MaxHeat, Total_Temperature);
5358 if (equiv_area)
SPRINTF (equivalent_area_coeff,
", %14.8e, %14.8e", Total_CEquivArea, Total_CNearFieldOF);
5359 if (engine || actuator_disk)
SPRINTF (engine_coeff,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e", Total_NetThrust, Total_Power, Total_AeroCD, Total_SolidCD, Total_IDR, Total_IDC);
5360 if (rotating_frame)
SPRINTF (rotating_frame_coeff,
", %14.8e, %14.8e, %14.8e", Total_CMerit, Total_CT, Total_CQ);
5362 SPRINTF (Cp_inverse_design,
", %14.8e", solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->GetTotal_CpDiff());
5363 if (thermal && !turbo)
SPRINTF (Heat_inverse_design,
", %14.8e", solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->GetTotal_HeatFluxDiff());
5368 SPRINTF (d_direct_coeff,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e",
5369 D_Total_CL, D_Total_CD, D_Total_CSF, D_Total_CMx, D_Total_CMy, D_Total_CMz, D_Total_CFx, D_Total_CFy,
5370 D_Total_CFz, D_Total_CEff, D_Total_Custom_ObjFunc);
5372 SPRINTF (d_direct_coeff,
", %12.10f, %12.10f, %12.10f, %12.10f, %12.10f", D_TotalPressure_Loss, D_FlowAngle_Out,
5373 D_TotalTotalEfficiency, D_TotalStaticEfficiency, D_EntropyGen);
5374 if (engine || actuator_disk)
5375 SPRINTF (d_direct_coeff,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e",
5376 D_Total_CL, D_Total_CD, D_Total_CSF, D_Total_CMx, D_Total_CMy, D_Total_CMz, D_Total_CFx, D_Total_CFy,
5377 D_Total_CFz, D_Total_CEff, D_Total_Custom_ObjFunc, D_Total_NetThrust, D_Total_Power, D_Total_AeroCD, D_Total_SolidCD, D_Total_IDR, D_Total_IDC);
5379 SPRINTF (d_direct_coeff,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e",
5380 D_Total_CL, D_Total_CD, D_Total_CSF, D_Total_CMx, D_Total_CMy, D_Total_CMz, D_Total_CFx, D_Total_CFy,
5381 D_Total_CFz, D_Total_CEff, D_Total_Custom_ObjFunc, D_Total_Heat, D_Total_MaxHeat);
5385 for (iMarker_Monitoring = 0; iMarker_Monitoring < config[
ZONE_0]->GetnMarker_Monitoring(); iMarker_Monitoring++) {
5387 if (iMarker_Monitoring == 0) {
5388 SPRINTF(aeroelastic_coeff,
", %12.10f", aeroelastic_plunge[iMarker_Monitoring]);
5391 SPRINTF(surface_coeff,
", %12.10f", aeroelastic_plunge[iMarker_Monitoring]);
5392 strcat(aeroelastic_coeff, surface_coeff);
5394 SPRINTF(surface_coeff,
", %12.10f", aeroelastic_pitch[iMarker_Monitoring]);
5395 strcat(aeroelastic_coeff, surface_coeff);
5399 if (output_per_surface) {
5400 for (iMarker_Monitoring = 0; iMarker_Monitoring < config[
ZONE_0]->GetnMarker_Monitoring(); iMarker_Monitoring++) {
5402 if (iMarker_Monitoring == 0) {
5403 SPRINTF(monitoring_coeff,
", %12.10f", Surface_CL[iMarker_Monitoring]);
5406 SPRINTF(surface_coeff,
", %12.10f", Surface_CL[iMarker_Monitoring]);
5407 strcat(monitoring_coeff, surface_coeff);
5409 SPRINTF(surface_coeff,
", %12.10f", Surface_CD[iMarker_Monitoring]);
5410 strcat(monitoring_coeff, surface_coeff);
5411 SPRINTF(surface_coeff,
", %12.10f", Surface_CSF[iMarker_Monitoring]);
5412 strcat(monitoring_coeff, surface_coeff);
5413 SPRINTF(surface_coeff,
", %12.10f", Surface_CEff[iMarker_Monitoring]);
5414 strcat(monitoring_coeff, surface_coeff);
5415 SPRINTF(surface_coeff,
", %12.10f", Surface_CFx[iMarker_Monitoring]);
5416 strcat(monitoring_coeff, surface_coeff);
5417 SPRINTF(surface_coeff,
", %12.10f", Surface_CFy[iMarker_Monitoring]);
5418 strcat(monitoring_coeff, surface_coeff);
5419 SPRINTF(surface_coeff,
", %12.10f", Surface_CFz[iMarker_Monitoring]);
5420 strcat(monitoring_coeff, surface_coeff);
5421 SPRINTF(surface_coeff,
", %12.10f", Surface_CMx[iMarker_Monitoring]);
5422 strcat(monitoring_coeff, surface_coeff);
5423 SPRINTF(surface_coeff,
", %12.10f", Surface_CMy[iMarker_Monitoring]);
5424 strcat(monitoring_coeff, surface_coeff);
5425 SPRINTF(surface_coeff,
", %12.10f", Surface_CMz[iMarker_Monitoring]);
5426 strcat(monitoring_coeff, surface_coeff);
5429 SPRINTF(surface_coeff,
", %12.10f", Surface_Buffet_Metric[iMarker_Monitoring]);
5430 strcat(monitoring_coeff, surface_coeff);
5436 for (iMarker_Monitoring = 0; iMarker_Monitoring < config[
ZONE_0]->GetnMarker_TurboPerformance(); iMarker_Monitoring++){
5437 if (iMarker_Monitoring == 0){
5438 SPRINTF(turbo_coeff,
", %12.10f", TotalPressureLoss[iMarker_Monitoring][nSpanWiseSections]);
5440 SPRINTF(surface_coeff,
", %12.10f", TotalPressureLoss[iMarker_Monitoring][nSpanWiseSections]);
5441 strcat(turbo_coeff, surface_coeff);
5443 SPRINTF(surface_coeff,
", %12.10f", KineticEnergyLoss[iMarker_Monitoring][nSpanWiseSections]);
5444 strcat(turbo_coeff, surface_coeff);
5445 SPRINTF(surface_coeff,
", %12.10f", EntropyGen[iMarker_Monitoring][nSpanWiseSections]);
5446 strcat(turbo_coeff, surface_coeff);
5447 SPRINTF(surface_coeff,
", %12.10f", EulerianWork[iMarker_Monitoring][nSpanWiseSections]);
5448 strcat(turbo_coeff, surface_coeff);
5449 SPRINTF(surface_coeff,
", %12.10f", PressureRatio[iMarker_Monitoring][nSpanWiseSections]);
5450 strcat(turbo_coeff, surface_coeff);
5451 SPRINTF(surface_coeff,
", %12.10f", 180.0/
PI_NUMBER*FlowAngleIn[iMarker_Monitoring][nSpanWiseSections]);
5452 strcat(turbo_coeff, surface_coeff);
5453 SPRINTF(surface_coeff,
", %12.10f", 180.0/
PI_NUMBER*FlowAngleOut[iMarker_Monitoring][nSpanWiseSections]);
5454 strcat(turbo_coeff, surface_coeff);
5455 SPRINTF(surface_coeff,
", %12.10f", 180.0/
PI_NUMBER*AbsFlowAngleIn[iMarker_Monitoring][nSpanWiseSections]);
5456 strcat(turbo_coeff, surface_coeff);
5457 SPRINTF(surface_coeff,
", %12.10f", 180.0/
PI_NUMBER*AbsFlowAngleOut[iMarker_Monitoring][nSpanWiseSections]);
5458 strcat(turbo_coeff, surface_coeff);
5459 SPRINTF(surface_coeff,
", %12.10f", MassFlowIn[iMarker_Monitoring][nSpanWiseSections]);
5460 strcat(turbo_coeff, surface_coeff);
5461 SPRINTF(surface_coeff,
", %12.10f", MassFlowOut[iMarker_Monitoring][nSpanWiseSections]);
5462 strcat(turbo_coeff, surface_coeff);
5463 SPRINTF(surface_coeff,
", %12.10f", sqrt(MachIn[iMarker_Monitoring][nSpanWiseSections][1]*MachIn[iMarker_Monitoring][nSpanWiseSections][1] + MachIn[iMarker_Monitoring][nSpanWiseSections][0]*MachIn[iMarker_Monitoring][nSpanWiseSections][0]));
5464 strcat(turbo_coeff, surface_coeff);
5465 SPRINTF(surface_coeff,
", %12.10f", sqrt(MachOut[iMarker_Monitoring][nSpanWiseSections][1]*MachOut[iMarker_Monitoring][nSpanWiseSections][1] + MachOut[iMarker_Monitoring][nSpanWiseSections][0]*MachOut[iMarker_Monitoring][nSpanWiseSections][0]));
5466 strcat(turbo_coeff, surface_coeff);
5468 SPRINTF(surface_coeff,
", %12.10f", TotalTotalEfficiency[iMarker_Monitoring][nSpanWiseSections]);
5469 strcat(turbo_coeff, surface_coeff);
5470 SPRINTF(surface_coeff,
", %12.10f", TotalStaticEfficiency[iMarker_Monitoring][nSpanWiseSections]);
5471 strcat(turbo_coeff, surface_coeff);
5479 if (compressible)
SPRINTF (flow_resid,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e", log10 (residual_flow[0]), log10 (residual_flow[1]), log10 (residual_flow[2]), log10 (residual_flow[3]), dummy);
5480 if (incompressible)
SPRINTF (flow_resid,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e", log10 (residual_flow[0]), log10 (residual_flow[1]), log10 (residual_flow[2]), log10 (residual_flow[3]), dummy);
5483 if (compressible)
SPRINTF (flow_resid,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e", log10 (residual_flow[0]), log10 (residual_flow[1]), log10 (residual_flow[2]), log10 (residual_flow[3]), log10 (residual_flow[4]) );
5484 if (incompressible)
SPRINTF (flow_resid,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e", log10 (residual_flow[0]), log10 (residual_flow[1]), log10 (residual_flow[2]), log10 (residual_flow[3]), log10 (residual_flow[4]));
5490 case 1:
SPRINTF (turb_resid,
", %12.10f", log10 (residual_turbulent[0]));
break;
5491 case 2:
SPRINTF (turb_resid,
", %12.10f, %12.10f", log10(residual_turbulent[0]), log10(residual_turbulent[1]));
break;
5497 if (output_surface) {
5498 SPRINTF( surface_outputs,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e", Surface_MassFlow, Surface_Mach, Surface_Temperature, Surface_Pressure, Surface_Density, Surface_Enthalpy, Surface_NormalVelocity, Surface_Uniformity, Surface_SecondaryStrength, Surface_MomentumDistortion, Surface_SecondOverUniform, Surface_TotalTemperature, Surface_TotalPressure, Surface_PressureDrop);
5501 SPRINTF( d_surface_outputs,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e",
5502 D_Surface_Uniformity, D_Surface_SecondaryStrength, D_Surface_MomentumDistortion, D_Surface_SecondOverUniform, D_Surface_PressureDrop);
5508 SPRINTF (trans_resid,
", %12.10f, %12.10f", log10(residual_transition[0]), log10(residual_transition[1]));
5512 if (output_comboObj) {
5513 SPRINTF(combo_obj,
", %12.10f", Total_ComboObj);
5527 SPRINTF (adjoint_coeff,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, 0.0", Total_Sens_Geo, Total_Sens_Mach, Total_Sens_AoA, Total_Sens_Press, Total_Sens_Temp);
5529 if (incompressible) {
5530 SPRINTF (adjoint_coeff,
", %14.8e, %14.8e, %14.8e, %14.8e", Total_Sens_Geo, Total_Sens_ModVel, Total_Sens_BPressure, Total_Sens_Temp);
5533 SPRINTF (adjoint_coeff,
", %14.8e, %14.8e, %14.8e", Total_Sens_Geo, Total_Sens_BPressure, Total_Sens_Temp);
5537 if (compressible)
SPRINTF (adj_flow_resid,
", %14.8e, %14.8e, %14.8e, %14.8e, 0.0", log10 (residual_adjflow[0]), log10 (residual_adjflow[1]), log10 (residual_adjflow[2]), log10 (residual_adjflow[3]) );
5538 if (incompressible)
SPRINTF (adj_flow_resid,
", %14.8e, %14.8e, %14.8e, %14.8e, 0.0", log10 (residual_adjflow[0]), log10 (residual_adjflow[1]), log10 (residual_adjflow[2]), log10 (residual_adjflow[3]) );
5541 if (compressible)
SPRINTF (adj_flow_resid,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e", log10 (residual_adjflow[0]), log10 (residual_adjflow[1]), log10 (residual_adjflow[2]), log10 (residual_adjflow[3]), log10 (residual_adjflow[4]) );
5542 if (incompressible)
SPRINTF (adj_flow_resid,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e", log10 (residual_adjflow[0]), log10 (residual_adjflow[1]), log10 (residual_adjflow[2]), log10 (residual_adjflow[3]), log10 (residual_adjflow[4]));
5548 if (nVar_AdjTurb == 1) {
5549 SPRINTF (adj_turb_resid,
", %14.8e", log10 (residual_adjturbulent[0]));
5550 }
else if (nVar_AdjTurb > 1) {
5551 SPRINTF (adj_turb_resid,
", %14.8e, %14.8e", log10 (residual_adjturbulent[0]), log10 (residual_adjturbulent[1]));
5557 if (weakly_coupled_heat) {
5558 SPRINTF (heat_resid,
", %14.8e", log10 (residual_heat[0]));
5565 SPRINTF (direct_coeff,
", %14.8e, %14.8e, %14.8e", Total_Heat, Total_MaxHeat, Total_Temperature);
5566 SPRINTF (heat_resid,
", %14.8e", log10 (residual_heat[0]));
5572 SPRINTF (begin_fem,
", %14.8e", 0.0);
5574 if (incload)
SPRINTF (fem_coeff,
", %14.8e, %14.8e, %14.8e", Total_VMStress, Total_ForceCoeff, Total_IncLoad);
5575 else SPRINTF (fem_coeff,
", %14.8e, %14.8e", Total_VMStress, Total_ForceCoeff);
5578 if (linear_analysis)
SPRINTF (fem_resid,
", %14.8e, %14.8e, %14.8e", log10 (residual_fem[0]), log10 (residual_fem[1]), dummy);
5579 if (nonlinear_analysis)
SPRINTF (fem_resid,
", %14.8e, %14.8e, %14.8e", log10 (residual_fem[0]), log10 (residual_fem[1]), log10 (residual_fem[2]));
5582 SPRINTF (fem_resid,
", %14.8e, %14.8e, %14.8e", log10 (residual_fem[0]), log10 (residual_fem[1]), log10 (residual_fem[2]));
5584 SPRINTF (end_fem,
", %lu, %12.10f\n", LinSolvIter, timeused/60.0);
5590 SPRINTF (direct_coeff,
", %12.10f", Total_VMStress);
5592 SPRINTF (fem_resid,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e", log10 (residual_fem[0]), log10 (residual_fem[1]), dummy, dummy, dummy);
5595 SPRINTF (fem_resid,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e", log10 (residual_fem[0]), log10 (residual_fem[1]), log10 (residual_fem[2]), dummy, dummy);
5602 if ((val_iZone == 0 && val_iInst == 0)|| fluid_structure){
5604 if ( (!fem && ((write_heads) && !(!DualTime_Iteration && Unsteady))) ||
5605 (fem && ((write_heads_FEM) && !(!DualTime_Iteration && nonlinear_analysis)))
5609 if (!Unsteady && (config[val_iZone]->GetUnsteady_Simulation() !=
TIME_STEPPING)) {
5610 switch (config[val_iZone]->GetKind_Solver()) {
5615 cout << endl <<
"---------------------- Local Time Stepping Summary ----------------------" << endl;
5617 for (
unsigned short iMesh = FinestMesh; iMesh <= config[val_iZone]->GetnMGLevels(); iMesh++)
5618 cout <<
"MG level: "<< iMesh <<
" -> Min. DT: " << solver_container[val_iZone][val_iInst][iMesh][
FLOW_SOL]->GetMin_Delta_Time()<<
5620 ". CFL: " << config[val_iZone]->GetCFL(iMesh) <<
"." << endl;
5623 cout <<
"CFL in zone 2: " << config[1]->GetCFL(
MESH_0) << endl;
5625 cout <<
"-------------------------------------------------------------------------" << endl;
5628 cout << endl <<
"---------------------- Direct Differentiation Summary -------------------" << endl;
5629 cout <<
"Coefficients are differentiated with respect to ";
5630 switch (direct_diff) {
5632 cout <<
"Mach number." << endl;
5635 cout <<
"AoA." << endl;
5638 cout <<
"AoS." << endl;
5641 cout <<
"Reynolds number." << endl;
5644 cout <<
"Turb/Lam ratio." << endl;
5647 cout <<
"Freestream Pressure." << endl;
5650 cout <<
"Freestream Temperature." << endl;
5653 cout <<
"Freestream Density." << endl;
5656 cout <<
"Freestream Viscosity." << endl;
5659 cout <<
"Design Variables." << endl;
5665 cout <<
" D_CLift(Total)" <<
" D_CDrag(Total)" <<
" D_CMz(Total)" <<
" D_CEff(Total)" << endl;
5666 cout.width(18); cout << D_Total_CL;
5667 cout.width(18); cout << D_Total_CD;
5668 cout.width(18); cout << D_Total_CMz;
5669 cout.width(18); cout << D_Total_CEff;
5670 cout << endl <<
"-------------------------------------------------------------------------" << endl;
5673 if (turbo && write_turbo && val_iZone== 0){
5680 cout <<
"------------------------ Discrete Adjoint Summary -----------------------" << endl;
5681 cout <<
"Total Geometry Sensitivity (updated every " << config[val_iZone]->GetWrt_Sol_Freq() <<
" iterations): ";
5683 cout.setf(ios::scientific, ios::floatfield);
5684 cout << Total_Sens_Geo;
5685 cout << endl <<
"-------------------------------------------------------------------------" << endl;
5692 if ((config[val_iZone]->GetUnsteady_Simulation() ==
TIME_STEPPING) && (config[val_iZone]->GetUnst_CFL()== 0.0))
5694 cout << endl <<
"Min DT: " << solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetMin_Delta_Time()<<
".Max DT: " << solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetMax_Delta_Time() <<
".Time step: " << config[val_iZone]->GetDelta_UnstTimeND() <<
".";
5695 }
else if ((config[val_iZone]->GetUnsteady_Simulation() ==
TIME_STEPPING) && (config[val_iZone]->GetUnst_CFL()!= 0.0)) {
5696 cout << endl <<
"Min DT: " << solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetMin_Delta_Time()<<
".Max DT: " << solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetMax_Delta_Time() <<
". Time step: " << solver_container[val_iZone][val_iInst][config[val_iZone]->GetFinestMesh()][
FLOW_SOL]->
GetMin_Delta_Time() <<
". CFL: " << config[val_iZone]->GetUnst_CFL()<<
".";
5698 cout << endl <<
"Min DT: " << solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetMin_Delta_Time()<<
".Max DT: " << solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetMax_Delta_Time() <<
".Dual Time step: " << config[val_iZone]->GetDelta_UnstTimeND() <<
".";
5701 cout << endl <<
"Dual Time step: " << config[val_iZone]->GetDelta_UnstTimeND() <<
".";
5705 else if (fem && !fsi) {
5707 cout << endl <<
"Simulation time: " << config[val_iZone]->GetCurrent_DynTime() <<
". Time step: " << config[val_iZone]->GetDelta_DynTime() <<
".";
5711 switch (config[val_iZone]->GetKind_Solver()) {
5716 iPointMaxResid = solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetPoint_Max(0);
5719 cout << endl <<
"----------------------- Residual Evolution Summary ----------------------" << endl;
5721 cout <<
"log10[Maximum residual]: " << log10(solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->GetRes_Max(0)) <<
"." << endl;
5723 if (config[val_iZone]->GetSystemMeasurements() ==
SI) {
5724 cout <<
"Maximum residual point " << iPointMaxResid <<
", located at (" << Coord[0] <<
", " << Coord[1];
5725 if (nDim == 3) cout <<
", " << Coord[2];
5726 cout <<
")." << endl;
5729 cout <<
"Maximum residual point " << iPointMaxResid <<
", located at (" << Coord[0]*12.0 <<
", " << Coord[1]*12.0;
5730 if (nDim == 3) cout <<
", " << Coord[2]*12.0;
5731 cout <<
")." << endl;
5736 if (config[val_iZone]->GetNonphysical_Points() > 0)
5737 cout <<
"There are " << config[val_iZone]->GetNonphysical_Points() <<
" non-physical points in the solution." << endl;
5738 if (config[val_iZone]->GetNonphysical_Reconstr() > 0)
5739 cout <<
"There are " << config[val_iZone]->GetNonphysical_Reconstr() <<
" non-physical states in the upwind reconstruction." << endl;
5741 cout <<
"-------------------------------------------------------------------------" << endl;
5743 if (!Unsteady) cout << endl <<
" Iter" <<
" Time(s)";
5744 else cout << endl <<
" IntIter" <<
" ExtIter";
5747 if (incompressible && !weakly_coupled_heat) {
5748 if (energy) {cout <<
" Res[Press]" <<
" Res[Temp]" <<
" CLift(Total)" <<
" CDrag(Total)" << endl;}
5749 else {cout <<
" Res[Press]" <<
" Res[Velx]" <<
" CLift(Total)" <<
" CDrag(Total)" << endl;}
5751 else if (incompressible && weakly_coupled_heat) cout <<
" Res[Press]" <<
" Res[Heat]" <<
" HFlux(Total)";
5752 else if (rotating_frame && nDim == 3 && !turbo) cout <<
" Res[Rho]" <<
" Res[RhoE]" <<
" CThrust(Total)" <<
" CTorque(Total)" << endl;
5753 else if (aeroelastic) cout <<
" Res[Rho]" <<
" Res[RhoE]" <<
" CLift(Total)" <<
" CDrag(Total)" <<
" plunge" <<
" pitch" << endl;
5754 else if (equiv_area) cout <<
" Res[Rho]" <<
" CLift(Total)" <<
" CDrag(Total)" <<
" CPress(N-F)" << endl;
5760 cout <<
" Res[Rho]" <<
" Res[RhoE]" <<
" TotPresLoss(%)" <<
" Entropy Gen.(%)";
5764 cout <<
" Res[Rho]" <<
" Res[RhoE]" <<
" TTEfficiency(%)" <<
" Entropy Gen.(%)";
5768 else if (actuator_disk) cout <<
" Res[Rho]" <<
" Res[RhoE]" <<
" CL(Total)" <<
" CD-CT(Total)";
5769 else if (engine) cout <<
" Res[Rho]" <<
" Res[RhoE]" <<
" CL(Total)" <<
" CD-CT(Total)";
5770 else cout <<
" Res[Rho]" <<
" Res[RhoE]" <<
" CL(Total)" <<
" CD(Total)";
5772 if(extra_heat_output) {
5773 cout <<
" Res[Heat]" <<
" HFlux(Total)";
5783 iPointMaxResid = solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetPoint_Max(0);
5786 cout << endl <<
"----------------------- Residual Evolution Summary ----------------------" << endl;
5788 cout <<
"log10[Maximum residual]: " << log10(solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->GetRes_Max(0)) <<
"." << endl;
5789 if (config[val_iZone]->GetSystemMeasurements() ==
SI) {
5790 cout <<
"Maximum residual point " << iPointMaxResid <<
", located at (" << Coord[0] <<
", " << Coord[1];
5791 if (nDim == 3) cout <<
", " << Coord[2];
5792 cout <<
")." << endl;
5795 cout <<
"Maximum residual point " << iPointMaxResid <<
", located at (" << Coord[0]*12.0 <<
", " << Coord[1]*12.0;
5796 if (nDim == 3) cout <<
", " << Coord[2]*12.0;
5797 cout <<
")." << endl;
5799 cout <<
"Maximum Omega " << solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetOmega_Max() <<
", maximum Strain Rate " << solver_container[val_iZone][val_iInst][FinestMesh][
FLOW_SOL]->
GetStrainMag_Max() <<
"." << endl;
5802 if (config[val_iZone]->GetNonphysical_Points() > 0)
5803 cout <<
"There are " << config[val_iZone]->GetNonphysical_Points() <<
" non-physical points in the solution." << endl;
5804 if (config[val_iZone]->GetNonphysical_Reconstr() > 0)
5805 cout <<
"There are " << config[val_iZone]->GetNonphysical_Reconstr() <<
" non-physical states in the upwind reconstruction." << endl;
5807 cout <<
"-------------------------------------------------------------------------" << endl;
5809 if (!Unsteady) cout << endl <<
" Iter" <<
" Time(s)";
5810 else cout << endl <<
" IntIter" <<
" ExtIter";
5811 if (incompressible) cout <<
" Res[Press]";
5812 else cout <<
" Res[Rho]";
5814 switch (config[val_iZone]->GetKind_Turb_Model()) {
5816 case SST: cout <<
" Res[kine]" <<
" Res[omega]";
break;
5819 if (weakly_coupled_heat) {
5820 cout <<
" Res[Heat]";
5823 if (transition) { cout <<
" Res[Int]" <<
" Res[Re]"; }
5824 else if (rotating_frame && nDim == 3 && !turbo ) cout <<
" CThrust(Total)" <<
" CTorque(Total)";
5825 else if (aeroelastic) cout <<
" CLift(Total)" <<
" CDrag(Total)" <<
" plunge" <<
" pitch";
5826 else if (equiv_area) cout <<
" CLift(Total)" <<
" CDrag(Total)" <<
" CPress(N-F)";
5830 cout <<
" TotPresLoss(%)" <<
" Entropy Gen.(%)";
5834 cout <<
" TTEfficiency(%)" <<
" Entropy Gen.(%)";
5838 else if (weakly_coupled_heat) {
5839 cout <<
" HFlux(Total)";
5841 else cout <<
" CLift(Total)" <<
" CDrag(Total)";
5843 if(extra_heat_output) {
5844 cout <<
" Res[Heat]" <<
" HFlux(Total)";
5852 if (!Unsteady) cout << endl <<
" Iter" <<
" Time(s)";
5853 else cout << endl <<
" IntIter" <<
" ExtIter";
5855 cout <<
" Res[Heat]" <<
" HFlux(Total)";
5859 if (!nonlinear_analysis) cout << endl <<
" Iter" <<
" Time(s)";
5860 else cout << endl <<
" IntIter" <<
" ExtIter";
5862 if (linear_analysis) {
5863 if (nDim == 2) cout <<
" Res[Displx]" <<
" Res[Disply]" <<
" VMS(Max)"<< endl;
5864 if (nDim == 3) cout <<
" Res[Displx]" <<
" Res[Disply]" <<
" Res[Displz]" <<
" VMS(Max)"<< endl;
5866 else if (nonlinear_analysis) {
5867 switch (config[val_iZone]->GetResidual_Criteria_FEM()) {
5869 cout <<
" Res[UTOL]" <<
" Res[RTOL]" <<
" Res[ETOL]" <<
" VMS(Max)"<< endl;
5872 cout <<
" Res[UTOL-A]" <<
" Res[RTOL-A]" <<
" Res[ETOL-A]" <<
" VMS(Max)"<< endl;
5875 cout <<
" Res[UTOL]" <<
" Res[RTOL]" <<
" Res[ETOL]" <<
" VMS(Max)"<< endl;
5887 cout << endl <<
"log10[Maximum residual]: " << log10(solver_container[val_iZone][val_iInst][FinestMesh][
ADJFLOW_SOL]->GetRes_Max(0)) <<
"." << endl;
5888 if (config[val_iZone]->GetSystemMeasurements() ==
SI) {
5889 cout <<
"Maximum residual point " << iPointMaxResid <<
", located at (" << Coord[0] <<
", " << Coord[1];
5890 if (nDim == 3) cout <<
", " << Coord[2];
5891 cout <<
")." << endl;
5894 cout <<
"Maximum residual point " << iPointMaxResid <<
", located at (" << Coord[0]*12.0 <<
", " << Coord[1]*12.0;
5895 if (nDim == 3) cout <<
", " << Coord[2]*12.0;
5896 cout <<
")." << endl;
5900 if (config[val_iZone]->GetNonphysical_Points() > 0)
5901 cout <<
"There are " << config[val_iZone]->GetNonphysical_Points() <<
" non-physical points in the solution." << endl;
5903 if (!Unsteady) cout << endl <<
" Iter" <<
" Time(s)";
5904 else cout << endl <<
" IntIter" <<
" ExtIter";
5906 if (incompressible) {
5907 if (energy) {cout <<
" Res[Psi_Press]" <<
" Res[Psi_Temp]";}
5908 else {cout <<
" Res[Psi_Press]" <<
" Res[Psi_Velx]";}
5910 else cout <<
" Res[Psi_Rho]" <<
" Res[Psi_E]";
5914 cout <<
" Sens_Press" <<
" Sens_AoA" << endl;
5916 if (incompressible) {
5918 cout <<
" Sens_Vin" <<
" Sens_Temp" << endl;
5920 cout <<
" Sens_Vin" <<
" Sens_Pout" << endl;
5923 cout <<
" Sens_PressOut" <<
" Sens_TotTempIn" << endl;
5926 cout <<
" Sens_Geo" <<
" Sens_AoA" << endl;
5935 cout << endl <<
"log10[Maximum residual]: " << log10(solver_container[val_iZone][val_iInst][FinestMesh][
ADJFLOW_SOL]->GetRes_Max(0)) <<
"." << endl;
5936 if (config[val_iZone]->GetSystemMeasurements() ==
SI) {
5937 cout <<
"Maximum residual point " << iPointMaxResid <<
", located at (" << Coord[0] <<
", " << Coord[1];
5938 if (nDim == 3) cout <<
", " << Coord[2];
5939 cout <<
")." << endl;
5942 cout <<
"Maximum residual point " << iPointMaxResid <<
", located at (" << Coord[0]*12.0 <<
", " << Coord[1]*12.0;
5943 if (nDim == 3) cout <<
", " << Coord[2]*12.0;
5944 cout <<
")." << endl;
5948 if (config[val_iZone]->GetNonphysical_Points() > 0)
5949 cout <<
"There are " << config[val_iZone]->GetNonphysical_Points() <<
" non-physical points in the solution." << endl;
5951 if (!Unsteady) cout << endl <<
" Iter" <<
" Time(s)";
5952 else cout << endl <<
" IntIter" <<
" ExtIter";
5954 if (incompressible) cout <<
" Res[Psi_Press]";
5955 else cout <<
" Res[Psi_Rho]";
5958 cout <<
" Res[Psi_Turb[0]]";
5961 if (incompressible) {
if (energy) {cout <<
" Res[Psi_Temp]";}
5962 else {cout <<
" Res[Psi_Velx]";}}
5963 else cout <<
" Res[Psi_E]";
5968 cout <<
" Sens_Press" <<
" Sens_AoA" << endl;
5970 if (incompressible) {
5971 cout <<
" Sens_Vin" <<
" Sens_Pout" << endl;
5974 cout <<
" Sens_PressOut" <<
" Sens_TotTempIn" << endl; }
5976 cout <<
" Sens_Geo" <<
" Sens_AoA" << endl;
5981 cout << endl <<
" IntIter" <<
" ExtIter";
5983 if (nDim == 2) cout <<
" Res[Ux_adj]" <<
" Res[Uy_adj]" <<
" Sens[E]" <<
" Sens[Nu]"<< endl;
5984 if (nDim == 3) cout <<
" Res[Ux_adj]" <<
" Res[Uy_adj]" <<
" Res[Uz_adj]" <<
" Sens[E]" <<
" Sens[Nu]"<< endl;
5995 if ((val_iZone == 0 && val_iInst == 0)|| fluid_structure){
5997 cout.setf(ios::fixed, ios::floatfield);
6000 cout.width(5); cout << iExtIter + ExtIter_OffSet;
6001 cout.width(11); cout << timeiter;
6003 }
else if (Unsteady && DualTime_Iteration) {
6004 cout.width(8); cout << iIntIter;
6005 cout.width(8); cout << iExtIter;
6009 if (!DualTime_Iteration) {
6010 if (!nonlinear_analysis) {
6011 cout.width(5); cout << iExtIter;
6012 cout.width(11); cout << timeiter;
6015 cout.width(8); cout << iIntIter;
6016 cout.width(8); cout << iExtIter;
6019 else if (discadj_fem){
6020 cout.width(8); cout << iIntIter;
6021 cout.width(8); cout << iExtIter;
6026 switch (config[val_iZone]->GetKind_Solver()) {
6032 if ((!DualTime_Iteration) && (output_files)) {
6034 ConvHist_file[0] << begin << direct_coeff;
6035 if (transp) ConvHist_file[0] << transp_coeff;
6036 if (buffet) ConvHist_file[0] << buffet_coeff;
6037 if (thermal) ConvHist_file[0] << heat_coeff;
6038 if (equiv_area) ConvHist_file[0] << equivalent_area_coeff;
6039 if (engine || actuator_disk) ConvHist_file[0] << engine_coeff;
6041 ConvHist_file[0] << Cp_inverse_design;
6042 if (thermal) ConvHist_file[0] << Heat_inverse_design;
6044 if (rotating_frame && !turbo) ConvHist_file[0] << rotating_frame_coeff;
6045 ConvHist_file[0] << flow_resid;
6046 if (weakly_coupled_heat) ConvHist_file[0] << heat_resid;
6049 ConvHist_file[0] << begin << turbo_coeff << flow_resid;
6052 if (aeroelastic) ConvHist_file[0] << aeroelastic_coeff;
6053 if (output_per_surface) ConvHist_file[0] << monitoring_coeff;
6054 if (output_surface) ConvHist_file[0] << surface_outputs;
6056 ConvHist_file[0] << d_direct_coeff;
6057 if (output_surface) ConvHist_file[0] << d_surface_outputs;
6059 if (output_comboObj) ConvHist_file[0] << combo_obj;
6060 ConvHist_file[0] << end;
6061 ConvHist_file[0].flush();
6065 if ((val_iZone == 0 && val_iInst == 0)|| fluid_structure){
6066 if(DualTime_Iteration || !Unsteady) {
6068 cout.setf(ios::fixed, ios::floatfield);
6069 cout.width(13); cout << log10(residual_flow[0]);
6072 if (nDim == 2 ) { cout.width(14); cout << log10(residual_flow[3]); }
6073 else { cout.width(14); cout << log10(residual_flow[4]); }
6075 if (incompressible && !weakly_coupled_heat) {
6076 if (energy) {cout.width(14); cout << log10(residual_flow[nDim+1]);}
6077 else {cout.width(14); cout << log10(residual_flow[1]);}
6079 if (incompressible && weakly_coupled_heat) { cout.width(14); cout << log10(residual_heat[0]);}
6083 if (rotating_frame && nDim == 3 && !turbo ) {
6084 cout.setf(ios::scientific, ios::floatfield);
6085 cout.width(15); cout << Total_CT;
6086 cout.width(15); cout << Total_CQ;
6087 cout.unsetf(ios_base::floatfield);
6089 else if (equiv_area) { cout.width(15); cout << min(10000.0, max(-10000.0, Total_CL)); cout.width(15); cout << min(10000.0, max(-10000.0, Total_CD)); cout.width(15);
6091 cout.setf(ios::scientific, ios::floatfield);
6092 cout << Total_CNearFieldOF; }
6094 cout.setf(ios::scientific, ios::floatfield);
6097 cout.width(15); cout << TotalPressureLoss[0][nSpanWiseSections]*100.0;
6098 cout.width(15); cout << EntropyGen[0][nSpanWiseSections]*100.0;
6101 cout.width(15); cout << TotalTotalEfficiency[nTurboPerf -1][nSpanWiseSections]*100.0;
6102 cout.width(15); cout << EntropyGen[nTurboPerf -1][nSpanWiseSections]*100.0;
6105 cout.unsetf(ios_base::floatfield);
6108 else if (weakly_coupled_heat) { cout.width(14); cout << log10(Total_Heat); }
6109 else { cout.width(15); cout << min(10000.0, max(-10000.0, Total_CL)); cout.width(15); cout << min(10000.0, max(-10000.0, Total_CD)); }
6111 cout.setf(ios::scientific, ios::floatfield);
6112 cout.width(15); cout << aeroelastic_plunge[0];
6113 cout.width(15); cout << aeroelastic_pitch[0];
6114 cout.unsetf(ios_base::floatfield);
6117 if (extra_heat_output) { cout.width(15); cout << Extra_Heat_Residual; cout.width(15); cout << Extra_Total_Heat; }
6127 if ((!DualTime_Iteration) && (output_files)) {
6130 ConvHist_file[0] << begin << direct_coeff;
6131 if (transp) ConvHist_file[0] << transp_coeff;
6132 if (buffet) ConvHist_file[0] << buffet_coeff;
6133 if (thermal) ConvHist_file[0] << heat_coeff;
6134 if (equiv_area) ConvHist_file[0] << equivalent_area_coeff;
6135 if (engine || actuator_disk) ConvHist_file[0] << engine_coeff;
6137 ConvHist_file[0] << Cp_inverse_design;
6138 if (thermal) ConvHist_file[0] << Heat_inverse_design;
6140 if (rotating_frame && !turbo) ConvHist_file[0] << rotating_frame_coeff;
6141 ConvHist_file[0] << flow_resid << turb_resid;
6142 if (weakly_coupled_heat) ConvHist_file[0] << heat_resid;
6145 ConvHist_file[0] << begin << turbo_coeff << flow_resid << turb_resid;
6148 if (aeroelastic) ConvHist_file[0] << aeroelastic_coeff;
6149 if (output_per_surface) ConvHist_file[0] << monitoring_coeff;
6150 if (output_surface) ConvHist_file[0] << surface_outputs;
6152 ConvHist_file[0] << d_direct_coeff;
6153 if (output_surface) ConvHist_file[0] << d_surface_outputs;
6155 if (output_comboObj) ConvHist_file[0] << combo_obj;
6156 ConvHist_file[0] << end;
6157 ConvHist_file[0].flush();
6162 if ((val_iZone == 0 && val_iInst == 0)|| fluid_structure){
6163 if(DualTime_Iteration || !Unsteady) {
6165 cout.setf(ios::fixed, ios::floatfield);
6167 if (incompressible) cout.width(13);
6168 else cout.width(14);
6169 cout << log10(residual_flow[0]);
6171 case 1: cout.width(14); cout << log10(residual_turbulent[0]);
break;
6172 case 2: cout.width(14); cout << log10(residual_turbulent[0]);
6173 cout.width(15); cout << log10(residual_turbulent[1]);
break;
6176 if (weakly_coupled_heat) {
6177 cout.width(14); cout << log10(residual_heat[0]);
6180 if (transition) { cout.width(14); cout << log10(residual_transition[0]); cout.width(14); cout << log10(residual_transition[1]); }
6182 if (rotating_frame && nDim == 3 && !turbo ) {
6183 cout.setf(ios::scientific, ios::floatfield);
6184 cout.width(15); cout << Total_CT; cout.width(15);
6186 cout.unsetf(ios_base::floatfield);
6188 else if (equiv_area) { cout.width(15); cout << min(10000.0, max(-10000.0, Total_CL)); cout.width(15); cout << min(10000.0, max(-10000.0, Total_CD)); cout.width(15);
6190 cout.setf(ios::scientific, ios::floatfield);
6191 cout << Total_CNearFieldOF; }
6193 cout.setf(ios::scientific, ios::floatfield);
6196 cout.width(15); cout << TotalPressureLoss[0][nSpanWiseSections]*100.0;
6197 cout.width(15); cout << EntropyGen[0][nSpanWiseSections]*100.0;
6201 cout.width(15); cout << TotalTotalEfficiency[nTurboPerf - 1][nSpanWiseSections]*100.0;
6202 cout.width(15); cout << EntropyGen[nTurboPerf -1][nSpanWiseSections]*100.0;
6204 cout.width(15); cout << D_EntropyGen;
6207 cout.unsetf(ios_base::floatfield);
6209 else if (weakly_coupled_heat) { cout.width(15); cout << Total_Heat; }
6210 else { cout.width(15); cout << min(10000.0, max(-10000.0, Total_CL)); cout.width(15); cout << min(10000.0, max(-10000.0, Total_CD)); }
6213 cout.setf(ios::scientific, ios::floatfield);
6214 cout.width(15); cout << aeroelastic_plunge[0];
6215 cout.width(15); cout << aeroelastic_pitch[0];
6216 cout.unsetf(ios_base::floatfield);
6219 if (extra_heat_output) { cout.width(15); cout << Extra_Heat_Residual; cout.width(15); cout << Extra_Total_Heat; }
6228 if (!DualTime_Iteration) {
6229 ConvHist_file[0] << begin << direct_coeff << heat_resid << end;
6230 ConvHist_file[0].flush();
6236 if (!DualTime_Iteration) {
6237 config[val_iZone]->GetHistFile()[0] << begin << fem_coeff << fem_resid << end_fem;
6238 config[val_iZone]->GetHistFile()[0].flush();
6241 cout.setf(ios::fixed, ios::floatfield);
6242 if (linear_analysis) {
6243 cout.width(14); cout << log10(residual_fem[0]);
6244 cout.width(14); cout << log10(residual_fem[1]);
6245 if (nDim == 3) { cout.width(14); cout << log10(residual_fem[2]); }
6247 else if (nonlinear_analysis) {
6248 cout.width(14); cout << log10(residual_fem[0]);
6249 cout.width(14); cout << log10(residual_fem[1]);
6250 cout.width(14); cout << log10(residual_fem[2]);
6254 cout.setf(ios::scientific, ios::floatfield);
6255 cout.width(14); cout << Total_VMStress;
6263 cout.setf(ios::fixed, ios::floatfield);
6265 cout.width(15); cout << log10(residual_fem[0]);
6266 cout.width(15); cout << log10(residual_fem[1]);
6267 if (nDim == 3) { cout.width(15); cout << log10(residual_fem[2]); }
6270 cout.setf(ios::scientific, ios::floatfield);
6273 if (config[val_iZone]->GetnElasticityMod() == 1){
6278 Total_SensE = 0.0; Total_SensNu = 0.0;
6279 for (
unsigned short iVar = 0; iVar < config[val_iZone]->GetnElasticityMod(); iVar++){
6285 Total_SensE = sqrt(Total_SensE);
6286 Total_SensNu = sqrt(Total_SensNu);
6287 cout.width(14); cout << Total_SensE;
6288 cout.width(14); cout << Total_SensNu;
6297 if (!DualTime_Iteration) {
6298 ConvHist_file[0] << begin << adjoint_coeff << adj_flow_resid << end;
6299 ConvHist_file[0].flush();
6301 if ((val_iZone == 0 && val_iInst == 0)|| fluid_structure){
6302 if (DualTime_Iteration || !Unsteady){
6304 cout.setf(ios::fixed, ios::floatfield);
6306 cout.width(15); cout << log10(residual_adjflow[0]);
6307 cout.width(15); cout << log10(residual_adjflow[nDim+1]);
6309 if (incompressible) {
6310 cout.width(17); cout << log10(residual_adjflow[0]);
6311 if (energy) {cout.width(16); cout << log10(residual_adjflow[nDim+1]);}
6312 else {cout.width(16); cout << log10(residual_adjflow[1]);}
6317 cout.setf(ios::scientific, ios::floatfield);
6320 cout.width(14); cout << Total_Sens_Press;
6321 cout.width(14); cout << Total_Sens_AoA;
6323 if (incompressible) {
6324 cout.width(14); cout << Total_Sens_ModVel;
6326 cout.width(14); cout << Total_Sens_Temp;
6328 cout.width(14); cout << Total_Sens_BPressure;
6332 cout.width(14); cout << Total_Sens_BPressure;
6333 cout.width(15); cout << Total_Sens_Temp;
6337 cout.setf(ios::scientific, ios::floatfield);
6338 cout.width(14); cout << Total_Sens_Geo;
6339 cout.width(14); cout << Total_Sens_AoA;
6342 cout.unsetf(ios_base::floatfield);
6349 if (!DualTime_Iteration) {
6350 ConvHist_file[0] << begin << adjoint_coeff << adj_flow_resid;
6352 ConvHist_file[0] << adj_turb_resid;
6353 ConvHist_file[0] << end;
6354 ConvHist_file[0].flush();
6356 if ((val_iZone == 0 && val_iInst == 0)|| fluid_structure){
6357 if (DualTime_Iteration || !Unsteady){
6359 cout.setf(ios::fixed, ios::floatfield);
6360 cout.width(17); cout << log10(residual_adjflow[0]);
6362 cout.width(17); cout << log10(residual_adjturbulent[0]);
6366 if (geometry[val_iZone][val_iInst][FinestMesh]->GetnDim() == 2 ) { cout.width(15); cout << log10(residual_adjflow[3]); }
6367 else { cout.width(15); cout << log10(residual_adjflow[4]); }
6369 if (incompressible) {
6370 if (energy) {cout.width(15); cout << log10(residual_adjflow[nDim+1]);}
6371 else {cout.width(15); cout << log10(residual_adjflow[1]);}
6377 cout.width(14); cout << Total_Sens_Press;
6378 cout.width(14); cout << Total_Sens_AoA;
6380 if (incompressible) {
6381 cout.width(14); cout << Total_Sens_ModVel;
6383 cout.width(14); cout << Total_Sens_Temp;
6385 cout.width(14); cout << Total_Sens_BPressure;
6388 cout.width(14); cout << Total_Sens_BPressure;
6389 cout.width(15); cout << Total_Sens_Temp;
6393 cout.setf(ios::scientific, ios::floatfield);
6394 cout.width(14); cout << Total_Sens_Geo;
6395 cout.width(14); cout << Total_Sens_AoA;
6398 cout.unsetf(ios_base::floatfield);
6404 cout.unsetf(ios::fixed);
6409 delete [] residual_flow;
6410 delete [] residual_turbulent;
6411 delete [] residual_transition;
6412 delete [] residual_fea;
6413 delete [] residual_fem;
6414 delete [] residual_heat;
6416 delete [] residual_adjflow;
6417 delete [] residual_adjturbulent;
6419 delete [] Surface_CL;
6420 delete [] Surface_CD;
6421 delete [] Surface_CSF;
6422 delete [] Surface_CEff;
6423 delete [] Surface_CFx;
6424 delete [] Surface_CFy;
6425 delete [] Surface_CFz;
6426 delete [] Surface_CMx;
6427 delete [] Surface_CMy;
6428 delete [] Surface_CMz;
6429 delete [] aeroelastic_pitch;
6430 delete [] aeroelastic_plunge;
6437 su2double CFLFactor = 1.0, power = 1.0, CFL = 0.0, CFLMin = 0.0, CFLMax = 0.0, Div = 1.0, Diff = 0.0, MGFactor[100];
6438 unsigned short iMesh;
6440 unsigned short FinestMesh = config[val_iZone]->
GetFinestMesh();
6441 unsigned long ExtIter = config[val_iZone]->
GetExtIter();
6442 unsigned short nVar = 1;
6447 switch( config[val_iZone]->GetKind_Solver()) {
6453 else if (weakly_coupled_heat) {
6468 if (RhoRes_New <
EPS) RhoRes_New =
EPS;
6469 if (RhoRes_Old[val_iZone] <
EPS) RhoRes_Old[val_iZone] = RhoRes_New;
6471 Div = RhoRes_Old[val_iZone]/RhoRes_New;
6472 Diff = RhoRes_New-RhoRes_Old[val_iZone];
6476 for (iMesh = 0; iMesh <= config[val_iZone]->
GetnMGLevels(); iMesh++) {
6477 if (iMesh ==
MESH_0) MGFactor[iMesh] = 1.0;
6478 else MGFactor[iMesh] = MGFactor[iMesh-1] * config[val_iZone]->
GetCFL(iMesh)/config[val_iZone]->
GetCFL(iMesh-1);
6486 if ((fabs(Diff) <= RhoRes_New*1E-8) && (ExtIter != 0)) { Div = 0.1; power = config[val_iZone]->
GetCFL_AdaptParam(1); }
6491 CFLFactor = pow(Div, power);
6493 for (iMesh = 0; iMesh <= config[val_iZone]->
GetnMGLevels(); iMesh++) {
6494 CFL = config[val_iZone]->
GetCFL(iMesh);
6497 if ((iMesh ==
MESH_0) && (CFL <= CFLMin)) {
6498 for (iMesh = 0; iMesh <= config[val_iZone]->
GetnMGLevels(); iMesh++) {
6499 config[val_iZone]->
SetCFL(iMesh, 1.001*CFLMin*MGFactor[iMesh]);
6503 if ((iMesh ==
MESH_0) && (CFL >= CFLMax)) {
6504 for (iMesh = 0; iMesh <= config[val_iZone]->
GetnMGLevels(); iMesh++)
6505 config[val_iZone]->SetCFL(iMesh, 0.999*CFLMax*MGFactor[iMesh]);
6509 config[val_iZone]->
SetCFL(iMesh, CFL);
6512 switch( config[val_iZone]->GetKind_Solver()) {
6516 else if (weakly_coupled_heat) RhoRes_Old[val_iZone] = solver_container[val_iZone][
INST_0][FinestMesh][
HEAT_SOL]->
GetRes_RMS(0);
6532 unsigned short iDim, iMarker_Monitoring;
6533 ofstream Breakdown_file;
6538 bool viscous = config[val_iZone]->
GetViscous();
6543 unsigned short Kind_Solver = config[val_iZone]->
GetKind_Solver();
6544 unsigned short Kind_Regime = config[val_iZone]->
GetKind_Regime();
6546 unsigned short Ref_NonDim = config[val_iZone]->
GetRef_NonDim();
6548 unsigned short FinestMesh = config[val_iZone]->
GetFinestMesh();
6549 unsigned short nDim = geometry[val_iZone][
INST_0][FinestMesh]->
GetnDim();
6551 (config[val_iZone]->GetKind_Solver() ==
RANS));
6557 cout << endl <<
"Writing the forces breakdown file ("<< config[val_iZone]->
GetBreakdown_FileName() <<
")." << endl;
6561 su2double Total_CL = 0.0, Total_CD = 0.0, Total_CSF = 0.0,
6562 Total_CMx = 0.0, Total_CMy = 0.0, Total_CMz = 0.0, Total_CEff = 0.0,
6563 Total_CoPx = 0.0, Total_CoPy = 0.0, Total_CoPz = 0.0,
6564 Total_CFx = 0.0, Total_CFy = 0.0, Total_CFz = 0.0, Inv_CL = 0.0,
6565 Inv_CD = 0.0, Inv_CSF = 0.0, Inv_CMx = 0.0, Inv_CMy = 0.0,
6566 Inv_CMz = 0.0, Inv_CEff = 0.0, Inv_CFx = 0.0, Inv_CFy = 0.0, Inv_CFz =
6568 Mnt_CD = 0.0, Mnt_CSF = 0.0, Mnt_CMx = 0.0, Mnt_CMy = 0.0,
6569 Mnt_CMz = 0.0, Mnt_CEff = 0.0, Mnt_CFx = 0.0, Mnt_CFy = 0.0, Mnt_CFz =
6571 Visc_CD = 0.0, Visc_CSF = 0.0, Visc_CMx = 0.0, Visc_CMy = 0.0,
6572 Visc_CMz = 0.0, Visc_CEff = 0.0, Visc_CFx = 0.0, Visc_CFy = 0.0, Visc_CFz =
6573 0.0, *Surface_CL = NULL, *Surface_CD = NULL,
6574 *Surface_CSF = NULL, *Surface_CEff = NULL, *Surface_CFx = NULL,
6575 *Surface_CFy = NULL, *Surface_CFz = NULL,
6576 *Surface_CMx = NULL, *Surface_CMy = NULL, *Surface_CMz = NULL,
6577 *Surface_CL_Inv = NULL,
6578 *Surface_CD_Inv = NULL, *Surface_CSF_Inv = NULL,
6579 *Surface_CEff_Inv = NULL, *Surface_CFx_Inv = NULL, *Surface_CFy_Inv =
6580 NULL, *Surface_CFz_Inv = NULL, *Surface_CMx_Inv = NULL,
6581 *Surface_CMy_Inv = NULL, *Surface_CMz_Inv = NULL,
6582 *Surface_CL_Visc = NULL,
6583 *Surface_CD_Visc = NULL, *Surface_CSF_Visc = NULL,
6584 *Surface_CEff_Visc = NULL, *Surface_CFx_Visc = NULL, *Surface_CFy_Visc =
6585 NULL, *Surface_CFz_Visc = NULL, *Surface_CMx_Visc = NULL,
6586 *Surface_CMy_Visc = NULL, *Surface_CMz_Visc = NULL,
6587 *Surface_CL_Mnt = NULL,
6588 *Surface_CD_Mnt = NULL, *Surface_CSF_Mnt = NULL,
6589 *Surface_CEff_Mnt = NULL, *Surface_CFx_Mnt = NULL, *Surface_CFy_Mnt =
6590 NULL, *Surface_CFz_Mnt = NULL, *Surface_CMx_Mnt = NULL,
6591 *Surface_CMy_Mnt = NULL, *Surface_CMz_Mnt = NULL;
6603 Surface_CEff =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6611 Surface_CL_Inv =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6612 Surface_CD_Inv =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6613 Surface_CSF_Inv =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6614 Surface_CEff_Inv =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6615 Surface_CFx_Inv =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6616 Surface_CFy_Inv =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6617 Surface_CFz_Inv =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6618 Surface_CMx_Inv =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6619 Surface_CMy_Inv =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6620 Surface_CMz_Inv =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6622 Surface_CL_Visc =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6623 Surface_CD_Visc =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6626 Surface_CEff_Visc =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6627 Surface_CFx_Visc =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6628 Surface_CFy_Visc =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6629 Surface_CFz_Visc =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6630 Surface_CMx_Visc =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6631 Surface_CMy_Visc =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6632 Surface_CMz_Visc =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6635 Surface_CL_Mnt =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6636 Surface_CD_Mnt =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6639 Surface_CEff_Mnt =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6640 Surface_CFx_Mnt =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6641 Surface_CFy_Mnt =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6642 Surface_CFz_Mnt =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6643 Surface_CMx_Mnt =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6644 Surface_CMy_Mnt =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6645 Surface_CMz_Mnt =
new su2double[config[
ZONE_0]->GetnMarker_Monitoring()];
6671 if (config[
ZONE_0]->GetSystemMeasurements() ==
US) { Total_CoPx *= 12.0; Total_CoPy *= 12.0; Total_CoPz *= 12.0; }
6745 for (iMarker_Monitoring = 0;
6746 iMarker_Monitoring < config[
ZONE_0]->GetnMarker_Monitoring();
6747 iMarker_Monitoring++) {
6748 Surface_CL[iMarker_Monitoring] =
6750 iMarker_Monitoring);
6751 Surface_CD[iMarker_Monitoring] =
6753 iMarker_Monitoring);
6754 Surface_CSF[iMarker_Monitoring] =
6756 iMarker_Monitoring);
6757 Surface_CEff[iMarker_Monitoring] =
6759 iMarker_Monitoring);
6760 Surface_CMx[iMarker_Monitoring] =
6762 iMarker_Monitoring);
6763 Surface_CMy[iMarker_Monitoring] =
6765 iMarker_Monitoring);
6766 Surface_CMz[iMarker_Monitoring] =
6768 iMarker_Monitoring);
6769 Surface_CFx[iMarker_Monitoring] =
6771 iMarker_Monitoring);
6772 Surface_CFy[iMarker_Monitoring] =
6774 iMarker_Monitoring);
6775 Surface_CFz[iMarker_Monitoring] =
6777 iMarker_Monitoring);
6779 Surface_CL_Inv[iMarker_Monitoring] =
6781 iMarker_Monitoring);
6782 Surface_CD_Inv[iMarker_Monitoring] =
6784 iMarker_Monitoring);
6785 Surface_CSF_Inv[iMarker_Monitoring] =
6787 iMarker_Monitoring);
6788 Surface_CEff_Inv[iMarker_Monitoring] =
6790 iMarker_Monitoring);
6791 Surface_CMx_Inv[iMarker_Monitoring] =
6793 iMarker_Monitoring);
6794 Surface_CMy_Inv[iMarker_Monitoring] =
6796 iMarker_Monitoring);
6797 Surface_CMz_Inv[iMarker_Monitoring] =
6799 iMarker_Monitoring);
6800 Surface_CFx_Inv[iMarker_Monitoring] =
6802 iMarker_Monitoring);
6803 Surface_CFy_Inv[iMarker_Monitoring] =
6805 iMarker_Monitoring);
6806 Surface_CFz_Inv[iMarker_Monitoring] =
6808 iMarker_Monitoring);
6809 Surface_CL_Visc[iMarker_Monitoring] =
6811 iMarker_Monitoring);
6812 Surface_CD_Visc[iMarker_Monitoring] =
6814 iMarker_Monitoring);
6815 Surface_CSF_Visc[iMarker_Monitoring] =
6817 iMarker_Monitoring);
6818 Surface_CEff_Visc[iMarker_Monitoring] =
6820 iMarker_Monitoring);
6821 Surface_CMx_Visc[iMarker_Monitoring] =
6823 iMarker_Monitoring);
6824 Surface_CMy_Visc[iMarker_Monitoring] =
6826 iMarker_Monitoring);
6827 Surface_CMz_Visc[iMarker_Monitoring] =
6829 iMarker_Monitoring);
6830 Surface_CFx_Visc[iMarker_Monitoring] =
6832 iMarker_Monitoring);
6833 Surface_CFy_Visc[iMarker_Monitoring] =
6835 iMarker_Monitoring);
6836 Surface_CFz_Visc[iMarker_Monitoring] =
6838 iMarker_Monitoring);
6840 Surface_CL_Mnt[iMarker_Monitoring] =
6842 iMarker_Monitoring);
6843 Surface_CD_Mnt[iMarker_Monitoring] =
6845 iMarker_Monitoring);
6846 Surface_CSF_Mnt[iMarker_Monitoring] =
6848 iMarker_Monitoring);
6849 Surface_CEff_Mnt[iMarker_Monitoring] =
6851 iMarker_Monitoring);
6852 Surface_CMx_Mnt[iMarker_Monitoring] =
6854 iMarker_Monitoring);
6855 Surface_CMy_Mnt[iMarker_Monitoring] =
6857 iMarker_Monitoring);
6858 Surface_CMz_Mnt[iMarker_Monitoring] =
6860 iMarker_Monitoring);
6861 Surface_CFx_Mnt[iMarker_Monitoring] =
6863 iMarker_Monitoring);
6864 Surface_CFy_Mnt[iMarker_Monitoring] =
6866 iMarker_Monitoring);
6867 Surface_CFz_Mnt[iMarker_Monitoring] =
6869 iMarker_Monitoring);
6876 string filename = config[val_iZone]->GetBreakdown_FileName();
6877 strcpy (cstr, filename.data());
6879 Breakdown_file.open(cstr, ios::out);
6881 Breakdown_file <<
"\n" <<
"-------------------------------------------------------------------------" <<
"\n";
6882 Breakdown_file <<
"| ___ _ _ ___ |" <<
"\n";
6883 Breakdown_file <<
"| / __| | | |_ ) Release 6.1.0 \"Falcon\" |" <<
"\n";
6884 Breakdown_file <<
"| \\__ \\ |_| |/ / |" <<
"\n";
6885 Breakdown_file <<
"| |___/\\___//___| Suite (Computational Fluid Dynamics Code) |" <<
"\n";
6886 Breakdown_file <<
"| |" <<
"\n";
6888 Breakdown_file <<
"-------------------------------------------------------------------------" <<
"\n";
6889 Breakdown_file <<
"| The current SU2 release has been coordinated by the |" <<
"\n";
6890 Breakdown_file <<
"| SU2 International Developers Society <www.su2devsociety.org> |" <<
"\n";
6891 Breakdown_file <<
"| with selected contributions from the open-source community |" <<
"\n";
6892 Breakdown_file <<
"-------------------------------------------------------------------------" <<
"\n";
6893 Breakdown_file <<
"| The main research teams contributing to the current release are: |" <<
"\n";
6894 Breakdown_file <<
"| - Prof. Juan J. Alonso's group at Stanford University. |" <<
"\n";
6895 Breakdown_file <<
"| - Prof. Piero Colonna's group at Delft University of Technology. |" <<
"\n";
6896 Breakdown_file <<
"| - Prof. Nicolas R. Gauger's group at Kaiserslautern U. of Technology. |" <<
"\n";
6897 Breakdown_file <<
"| - Prof. Alberto Guardone's group at Polytechnic University of Milan. |" <<
"\n";
6898 Breakdown_file <<
"| - Prof. Rafael Palacios' group at Imperial College London. |" <<
"\n";
6899 Breakdown_file <<
"| - Prof. Vincent Terrapon's group at the University of Liege. |" <<
"\n";
6900 Breakdown_file <<
"| - Prof. Edwin van der Weide's group at the University of Twente. |" <<
"\n";
6901 Breakdown_file <<
"| - Lab. of New Concepts in Aeronautics at Tech. Inst. of Aeronautics. |" <<
"\n";
6902 Breakdown_file <<
"-------------------------------------------------------------------------" <<
"\n";
6903 Breakdown_file <<
"| Copyright 2012-2018, Francisco D. Palacios, Thomas D. Economon, |" <<
"\n";
6904 Breakdown_file <<
"| Tim Albring, and the SU2 contributors. |" <<
"\n";
6905 Breakdown_file <<
"| |" <<
"\n";
6906 Breakdown_file <<
"| SU2 is free software; you can redistribute it and/or |" <<
"\n";
6907 Breakdown_file <<
"| modify it under the terms of the GNU Lesser General Public |" <<
"\n";
6908 Breakdown_file <<
"| License as published by the Free Software Foundation; either |" <<
"\n";
6909 Breakdown_file <<
"| version 2.1 of the License, or (at your option) any later version. |" <<
"\n";
6910 Breakdown_file <<
"| |" <<
"\n";
6911 Breakdown_file <<
"| SU2 is distributed in the hope that it will be useful, |" <<
"\n";
6912 Breakdown_file <<
"| but WITHOUT ANY WARRANTY; without even the implied warranty of |" <<
"\n";
6913 Breakdown_file <<
"| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |" <<
"\n";
6914 Breakdown_file <<
"| Lesser General Public License for more details. |" <<
"\n";
6915 Breakdown_file <<
"| |" <<
"\n";
6916 Breakdown_file <<
"| You should have received a copy of the GNU Lesser General Public |" <<
"\n";
6917 Breakdown_file <<
"| License along with SU2. If not, see <http://www.gnu.org/licenses/>. |" <<
"\n";
6918 Breakdown_file <<
"-------------------------------------------------------------------------" <<
"\n";
6920 Breakdown_file.precision(6);
6922 Breakdown_file <<
"\n" <<
"\n" <<
"Problem definition:" <<
"\n" <<
"\n";
6924 switch (Kind_Solver) {
6926 if (Kind_Regime ==
COMPRESSIBLE) Breakdown_file <<
"Compressible Euler equations." <<
"\n";
6927 if (Kind_Regime ==
INCOMPRESSIBLE) Breakdown_file <<
"Incompressible Euler equations." <<
"\n";
6930 if (Kind_Regime ==
COMPRESSIBLE) Breakdown_file <<
"Compressible Laminar Navier-Stokes' equations." <<
"\n";
6931 if (Kind_Regime ==
INCOMPRESSIBLE) Breakdown_file <<
"Incompressible Laminar Navier-Stokes' equations." <<
"\n";
6934 if (Kind_Regime ==
COMPRESSIBLE) Breakdown_file <<
"Compressible RANS equations." <<
"\n";
6935 if (Kind_Regime ==
INCOMPRESSIBLE) Breakdown_file <<
"Incompressible RANS equations." <<
"\n";
6936 Breakdown_file <<
"Turbulence model: ";
6937 switch (Kind_Turb_Model) {
6938 case SA: Breakdown_file <<
"Spalart Allmaras" <<
"\n";
break;
6939 case SA_NEG: Breakdown_file <<
"Negative Spalart Allmaras" <<
"\n";
break;
6940 case SST: Breakdown_file <<
"Menter's SST" <<
"\n";
break;
6952 Breakdown_file <<
"Mach number: " << config[val_iZone]->GetMach() <<
"."<<
"\n";
6953 Breakdown_file <<
"Angle of attack (AoA): " << config[val_iZone]->GetAoA() <<
" deg, and angle of sideslip (AoS): " << config[val_iZone]->GetAoS() <<
" deg."<<
"\n";
6956 Breakdown_file <<
"Reynolds number: " << config[val_iZone]->GetReynolds() <<
"."<<
"\n";
6960 Breakdown_file <<
"Simulation at a cte. CL: " << config[val_iZone]->GetTarget_CL() <<
".\n";
6961 Breakdown_file <<
"Approx. Delta CL / Delta AoA: " << config[val_iZone]->GetdCL_dAlpha() <<
" (1/deg).\n";
6962 Breakdown_file <<
"Approx. Delta CD / Delta CL: " << config[val_iZone]->GetdCD_dCL() <<
".\n";
6964 Breakdown_file <<
"Approx. Delta CMx / Delta CL: " << config[val_iZone]->GetdCMx_dCL() <<
".\n";
6965 Breakdown_file <<
"Approx. Delta CMy / Delta CL: " << config[val_iZone]->GetdCMy_dCL() <<
".\n";
6967 Breakdown_file <<
"Approx. Delta CMz / Delta CL: " << config[val_iZone]->GetdCMz_dCL() <<
".\n";
6970 if (Ref_NonDim ==
DIMENSIONAL) { Breakdown_file <<
"Dimensional simulation." <<
"\n"; }
6971 else if (Ref_NonDim ==
FREESTREAM_PRESS_EQ_ONE) { Breakdown_file <<
"Non-Dimensional simulation (P=1.0, Rho=1.0, T=1.0 at the farfield)." <<
"\n"; }
6972 else if (Ref_NonDim ==
FREESTREAM_VEL_EQ_MACH) { Breakdown_file <<
"Non-Dimensional simulation (V=Mach, Rho=1.0, T=1.0 at the farfield)." <<
"\n"; }
6973 else if (Ref_NonDim ==
FREESTREAM_VEL_EQ_ONE) { Breakdown_file <<
"Non-Dimensional simulation (V=1.0, Rho=1.0, T=1.0 at the farfield)." <<
"\n"; }
6975 if (config[val_iZone]->GetSystemMeasurements() ==
SI) {
6976 Breakdown_file <<
"The reference area is " << config[val_iZone]->GetRefArea() <<
" m^2." <<
"\n";
6977 Breakdown_file <<
"The reference length is " << config[val_iZone]->GetRefLength() <<
" m." <<
"\n";
6980 if (config[val_iZone]->GetSystemMeasurements() ==
US) {
6981 Breakdown_file <<
"The reference area is " << config[val_iZone]->GetRefArea()*12.0*12.0 <<
" in^2." <<
"\n";
6982 Breakdown_file <<
"The reference length is " << config[val_iZone]->GetRefLength()*12.0 <<
" in." <<
"\n";
6984 Breakdown_file <<
"\n" <<
"\n" <<
"Problem definition:" <<
"\n" <<
"\n";
6987 Breakdown_file <<
"Viscous flow: Computing pressure using the ideal gas law" <<
"\n";
6988 Breakdown_file <<
"based on the free-stream temperature and a density computed" <<
"\n";
6989 Breakdown_file <<
"from the Reynolds number." <<
"\n";
6991 Breakdown_file <<
"Inviscid flow: Computing density based on free-stream" <<
"\n";
6992 Breakdown_file <<
"temperature and pressure using the ideal gas law." <<
"\n";
6996 if (grid_movement) Breakdown_file <<
"Force coefficients computed using MACH_MOTION." <<
"\n";
6997 else Breakdown_file <<
"Force coefficients computed using free-stream values." <<
"\n";
6999 if (incompressible) {
7000 Breakdown_file <<
"Viscous and Inviscid flow: rho_ref, and vel_ref" <<
"\n";
7001 Breakdown_file <<
"are based on the free-stream values, p_ref = rho_ref*vel_ref^2." <<
"\n";
7002 Breakdown_file <<
"The free-stream value of the pressure is 0." <<
"\n";
7003 Breakdown_file <<
"Mach number: "<< config[val_iZone]->GetMach() <<
", computed using the Bulk modulus." <<
"\n";
7004 Breakdown_file <<
"Angle of attack (deg): "<< config[val_iZone]->GetAoA() <<
", computed using the the free-stream velocity." <<
"\n";
7005 Breakdown_file <<
"Side slip angle (deg): "<< config[val_iZone]->GetAoS() <<
", computed using the the free-stream velocity." <<
"\n";
7006 if (viscous) Breakdown_file <<
"Reynolds number: " << config[val_iZone]->GetReynolds() <<
", computed using free-stream values."<<
"\n";
7007 Breakdown_file <<
"Only dimensional computation, the grid should be dimensional." <<
"\n";
7010 Breakdown_file <<
"-- Input conditions:"<<
"\n";
7013 switch (config[val_iZone]->GetKind_FluidModel()) {
7016 Breakdown_file <<
"Fluid Model: STANDARD_AIR "<<
"\n";
7017 Breakdown_file <<
"Specific gas constant: " << config[val_iZone]->GetGas_Constant();
7018 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" N.m/kg.K." <<
"\n";
7019 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" lbf.ft/slug.R." <<
"\n";
7020 Breakdown_file <<
"Specific gas constant (non-dim): " << config[val_iZone]->GetGas_ConstantND()<<
"\n";
7021 Breakdown_file <<
"Specific Heat Ratio: 1.4000 "<<
"\n";
7025 Breakdown_file <<
"Fluid Model: IDEAL_GAS "<<
"\n";
7026 Breakdown_file <<
"Specific gas constant: " << config[val_iZone]->GetGas_Constant() <<
" N.m/kg.K." <<
"\n";
7027 Breakdown_file <<
"Specific gas constant (non-dim): " << config[val_iZone]->GetGas_ConstantND()<<
"\n";
7028 Breakdown_file <<
"Specific Heat Ratio: "<< config[val_iZone]->GetGamma() <<
"\n";
7032 Breakdown_file <<
"Fluid Model: Van der Waals "<<
"\n";
7033 Breakdown_file <<
"Specific gas constant: " << config[val_iZone]->GetGas_Constant() <<
" N.m/kg.K." <<
"\n";
7034 Breakdown_file <<
"Specific gas constant (non-dim): " << config[val_iZone]->GetGas_ConstantND()<<
"\n";
7035 Breakdown_file <<
"Specific Heat Ratio: "<< config[val_iZone]->GetGamma() <<
"\n";
7036 Breakdown_file <<
"Critical Pressure: " << config[val_iZone]->GetPressure_Critical() <<
" Pa." <<
"\n";
7037 Breakdown_file <<
"Critical Temperature: " << config[val_iZone]->GetTemperature_Critical() <<
" K." <<
"\n";
7038 Breakdown_file <<
"Critical Pressure (non-dim): " << config[val_iZone]->GetPressure_Critical() /config[val_iZone]->GetPressure_Ref() <<
"\n";
7039 Breakdown_file <<
"Critical Temperature (non-dim) : " << config[val_iZone]->GetTemperature_Critical() /config[val_iZone]->GetTemperature_Ref() <<
"\n";
7043 Breakdown_file <<
"Fluid Model: Peng-Robinson "<<
"\n";
7044 Breakdown_file <<
"Specific gas constant: " << config[val_iZone]->GetGas_Constant() <<
" N.m/kg.K." <<
"\n";
7045 Breakdown_file <<
"Specific gas constant(non-dim): " << config[val_iZone]->GetGas_ConstantND()<<
"\n";
7046 Breakdown_file <<
"Specific Heat Ratio: "<< config[val_iZone]->GetGamma() <<
"\n";
7047 Breakdown_file <<
"Critical Pressure: " << config[val_iZone]->GetPressure_Critical() <<
" Pa." <<
"\n";
7048 Breakdown_file <<
"Critical Temperature: " << config[val_iZone]->GetTemperature_Critical() <<
" K." <<
"\n";
7049 Breakdown_file <<
"Critical Pressure (non-dim): " << config[val_iZone]->GetPressure_Critical() /config[val_iZone]->GetPressure_Ref() <<
"\n";
7050 Breakdown_file <<
"Critical Temperature (non-dim) : " << config[val_iZone]->GetTemperature_Critical() /config[val_iZone]->GetTemperature_Ref() <<
"\n";
7056 switch (config[val_iZone]->GetKind_ViscosityModel()) {
7059 Breakdown_file <<
"Viscosity Model: CONSTANT_VISCOSITY "<<
"\n";
7060 Breakdown_file <<
"Laminar Viscosity: " << config[val_iZone]->GetMu_Constant();
7061 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" N.s/m^2." <<
"\n";
7062 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" lbf.s/ft^2." <<
"\n";
7063 Breakdown_file <<
"Laminar Viscosity (non-dim): " << config[val_iZone]->GetMu_ConstantND()<<
"\n";
7067 Breakdown_file <<
"Viscosity Model: SUTHERLAND "<<
"\n";
7068 Breakdown_file <<
"Ref. Laminar Viscosity: " << config[val_iZone]->GetMu_Ref();
7069 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" N.s/m^2." <<
"\n";
7070 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" lbf.s/ft^2." <<
"\n";
7071 Breakdown_file <<
"Ref. Temperature: " << config[val_iZone]->GetMu_Temperature_Ref();
7072 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" K." <<
"\n";
7073 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" R." <<
"\n";
7074 Breakdown_file <<
"Sutherland Constant: "<< config[val_iZone]->GetMu_S();
7075 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" K." <<
"\n";
7076 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" R." <<
"\n";
7077 Breakdown_file <<
"Laminar Viscosity (non-dim): " << config[val_iZone]->GetMu_ConstantND()<<
"\n";
7078 Breakdown_file <<
"Ref. Temperature (non-dim): " << config[val_iZone]->GetMu_Temperature_RefND()<<
"\n";
7079 Breakdown_file <<
"Sutherland constant (non-dim): "<< config[val_iZone]->GetMu_SND()<<
"\n";
7083 switch (config[val_iZone]->GetKind_ConductivityModel()) {
7086 Breakdown_file <<
"Conductivity Model: CONSTANT_PRANDTL "<<
"\n";
7087 Breakdown_file <<
"Prandtl: " << config[val_iZone]->GetPrandtl_Lam()<<
"\n";
7091 Breakdown_file <<
"Conductivity Model: CONSTANT_CONDUCTIVITY "<<
"\n";
7092 Breakdown_file <<
"Molecular Conductivity: " << config[val_iZone]->GetKt_Constant()<<
" W/m^2.K." <<
"\n";
7093 Breakdown_file <<
"Molecular Conductivity (non-dim): " << config[val_iZone]->GetKt_ConstantND()<<
"\n";
7100 if (incompressible) {
7101 Breakdown_file <<
"Bulk modulus: " << config[val_iZone]->GetBulk_Modulus();
7102 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" Pa." <<
"\n";
7103 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" psf." <<
"\n";
7104 Breakdown_file <<
"Epsilon^2 multiplier of Beta for incompressible preconditioner: " << config[val_iZone]->GetBeta_Factor();
7105 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" Pa." <<
"\n";
7106 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" psf." <<
"\n";
7109 Breakdown_file <<
"Free-stream static pressure: " << config[val_iZone]->GetPressure_FreeStream();
7110 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" Pa." <<
"\n";
7111 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" psf." <<
"\n";
7113 Breakdown_file <<
"Free-stream total pressure: " << config[val_iZone]->GetPressure_FreeStream() * pow( 1.0+config[val_iZone]->GetMach()*config[val_iZone]->GetMach()*0.5*(config[val_iZone]->GetGamma()-1.0), config[val_iZone]->GetGamma()/(config[val_iZone]->GetGamma()-1.0) );
7114 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" Pa." <<
"\n";
7115 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" psf." <<
"\n";
7118 Breakdown_file <<
"Free-stream temperature: " << config[val_iZone]->GetTemperature_FreeStream();
7119 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" K." <<
"\n";
7120 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" R." <<
"\n";
7122 Breakdown_file <<
"Free-stream total temperature: " << config[val_iZone]->GetTemperature_FreeStream() * (1.0 + config[val_iZone]->GetMach() * config[val_iZone]->GetMach() * 0.5 * (config[val_iZone]->GetGamma() - 1.0));
7123 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" K." <<
"\n";
7124 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" R." <<
"\n";
7127 Breakdown_file <<
"Free-stream density: " << config[val_iZone]->GetDensity_FreeStream();
7128 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" kg/m^3." <<
"\n";
7129 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" slug/ft^3." <<
"\n";
7132 Breakdown_file <<
"Free-stream velocity: (" << config[val_iZone]->GetVelocity_FreeStream()[0] <<
", ";
7133 Breakdown_file << config[val_iZone]->GetVelocity_FreeStream()[1] <<
")";
7136 Breakdown_file <<
"Free-stream velocity: (" << config[val_iZone]->GetVelocity_FreeStream()[0] <<
", ";
7137 Breakdown_file << config[val_iZone]->GetVelocity_FreeStream()[1] <<
", " << config[val_iZone]->GetVelocity_FreeStream()[2] <<
")";
7139 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" m/s. ";
7140 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" ft/s. ";
7142 Breakdown_file <<
"Magnitude: " << config[val_iZone]->GetModVel_FreeStream();
7143 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" m/s." <<
"\n";
7144 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" ft/s." <<
"\n";
7147 Breakdown_file <<
"Free-stream total energy per unit mass: " << config[val_iZone]->GetEnergy_FreeStream();
7148 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" m^2/s^2." <<
"\n";
7149 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" ft^2/s^2." <<
"\n";
7153 Breakdown_file <<
"Free-stream viscosity: " << config[val_iZone]->GetViscosity_FreeStream();
7154 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" N.s/m^2." <<
"\n";
7155 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" lbf.s/ft^2." <<
"\n";
7157 Breakdown_file <<
"Free-stream turb. kinetic energy per unit mass: " << config[val_iZone]->GetTke_FreeStream();
7158 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" m^2/s^2." <<
"\n";
7159 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" ft^2/s^2." <<
"\n";
7160 Breakdown_file <<
"Free-stream specific dissipation: " << config[val_iZone]->GetOmega_FreeStream();
7161 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" 1/s." <<
"\n";
7162 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" 1/s." <<
"\n";
7166 if (unsteady) { Breakdown_file <<
"Total time: " << config[val_iZone]->GetTotal_UnstTime() <<
" s. Time step: " << config[val_iZone]->GetDelta_UnstTime() <<
" s." <<
"\n"; }
7170 Breakdown_file <<
"-- Reference values:"<<
"\n";
7173 Breakdown_file <<
"Reference specific gas constant: " << config[val_iZone]->GetGas_Constant_Ref();
7174 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" N.m/kg.K." <<
"\n";
7175 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" lbf.ft/slug.R." <<
"\n";
7178 Breakdown_file <<
"Reference pressure: " << config[val_iZone]->GetPressure_Ref();
7179 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" Pa." <<
"\n";
7180 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" psf." <<
"\n";
7183 Breakdown_file <<
"Reference temperature: " << config[val_iZone]->GetTemperature_Ref();
7184 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" K." <<
"\n";
7185 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" R." <<
"\n";
7188 Breakdown_file <<
"Reference density: " << config[val_iZone]->GetDensity_Ref();
7189 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" kg/m^3." <<
"\n";
7190 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" slug/ft^3." <<
"\n";
7192 Breakdown_file <<
"Reference velocity: " << config[val_iZone]->GetVelocity_Ref();
7193 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" m/s." <<
"\n";
7194 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" ft/s." <<
"\n";
7197 Breakdown_file <<
"Reference energy per unit mass: " << config[val_iZone]->GetEnergy_Ref();
7198 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" m^2/s^2." <<
"\n";
7199 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" ft^2/s^2." <<
"\n";
7202 if (incompressible) {
7203 Breakdown_file <<
"Reference length: " << config[val_iZone]->GetLength_Ref();
7204 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" m." <<
"\n";
7205 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" in." <<
"\n";
7209 Breakdown_file <<
"Reference viscosity: " << config[val_iZone]->GetViscosity_Ref();
7210 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" N.s/m^2." <<
"\n";
7211 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" lbf.s/ft^2." <<
"\n";
7213 Breakdown_file <<
"Reference conductivity: " << config[val_iZone]->GetConductivity_Ref();
7214 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" W/m^2.K." <<
"\n";
7215 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" lbf/ft.s.R." <<
"\n";
7220 if (unsteady) Breakdown_file <<
"Reference time: " << config[val_iZone]->GetTime_Ref() <<
" s." <<
"\n";
7224 Breakdown_file <<
"-- Resulting non-dimensional state:" <<
"\n";
7225 Breakdown_file <<
"Mach number (non-dim): " << config[val_iZone]->GetMach() <<
"\n";
7227 Breakdown_file <<
"Reynolds number (non-dim): " << config[val_iZone]->GetReynolds() <<
". Re length: " << config[val_iZone]->GetLength_Reynolds();
7228 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" m." <<
"\n";
7229 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" ft." <<
"\n";
7232 Breakdown_file <<
"Froude number (non-dim): " << config[val_iZone]->GetFroude() <<
"\n";
7233 Breakdown_file <<
"Lenght of the baseline wave (non-dim): " << 2.0*
PI_NUMBER*config[val_iZone]->GetFroude()*config[val_iZone]->GetFroude() <<
"\n";
7237 Breakdown_file <<
"Specific gas constant (non-dim): " << config[val_iZone]->GetGas_ConstantND() <<
"\n";
7238 Breakdown_file <<
"Free-stream temperature (non-dim): " << config[val_iZone]->GetTemperature_FreeStreamND() <<
"\n";
7241 Breakdown_file <<
"Free-stream pressure (non-dim): " << config[val_iZone]->GetPressure_FreeStreamND() <<
"\n";
7243 Breakdown_file <<
"Free-stream density (non-dim): " << config[val_iZone]->GetDensity_FreeStreamND() <<
"\n";
7246 Breakdown_file <<
"Free-stream velocity (non-dim): (" << config[val_iZone]->GetVelocity_FreeStreamND()[0] <<
", ";
7247 Breakdown_file << config[val_iZone]->GetVelocity_FreeStreamND()[1] <<
"). ";
7249 Breakdown_file <<
"Free-stream velocity (non-dim): (" << config[val_iZone]->GetVelocity_FreeStreamND()[0] <<
", ";
7250 Breakdown_file << config[val_iZone]->GetVelocity_FreeStreamND()[1] <<
", " << config[val_iZone]->GetVelocity_FreeStreamND()[2] <<
"). ";
7252 Breakdown_file <<
"Magnitude: " << config[val_iZone]->GetModVel_FreeStreamND() <<
"\n";
7255 Breakdown_file <<
"Free-stream total energy per unit mass (non-dim): " << config[val_iZone]->GetEnergy_FreeStreamND() <<
"\n";
7258 Breakdown_file <<
"Free-stream viscosity (non-dim): " << config[val_iZone]->GetViscosity_FreeStreamND() <<
"\n";
7260 Breakdown_file <<
"Free-stream turb. kinetic energy (non-dim): " << config[val_iZone]->GetTke_FreeStreamND() <<
"\n";
7261 Breakdown_file <<
"Free-stream specific dissipation (non-dim): " << config[val_iZone]->GetOmega_FreeStreamND() <<
"\n";
7266 Breakdown_file <<
"Total time (non-dim): " << config[val_iZone]->GetTotal_UnstTimeND() <<
"\n";
7267 Breakdown_file <<
"Time step (non-dim): " << config[val_iZone]->GetDelta_UnstTimeND() <<
"\n";
7274 bool energy = config[val_iZone]->GetEnergy_Equation();
7275 bool boussinesq = (config[val_iZone]->GetKind_DensityModel() ==
BOUSSINESQ);
7277 if (config[val_iZone]->GetRef_Inc_NonDim() ==
DIMENSIONAL) {
7278 Breakdown_file <<
"Viscous and Inviscid flow: rho_ref, vel_ref, temp_ref, p_ref" <<
"\n";
7279 Breakdown_file <<
"are set to 1.0 in order to perform a dimensional calculation." <<
"\n";
7280 if (grid_movement) Breakdown_file <<
"Force coefficients computed using MACH_MOTION." <<
"\n";
7281 else Breakdown_file <<
"Force coefficients computed using initial values." <<
"\n";
7283 else if (config[val_iZone]->GetRef_Inc_NonDim() ==
INITIAL_VALUES) {
7284 Breakdown_file <<
"Viscous and Inviscid flow: rho_ref, vel_ref, and temp_ref" <<
"\n";
7285 Breakdown_file <<
"are based on the initial values, p_ref = rho_ref*vel_ref^2." <<
"\n";
7286 if (grid_movement) Breakdown_file <<
"Force coefficients computed using MACH_MOTION." <<
"\n";
7287 else Breakdown_file <<
"Force coefficients computed using initial values." <<
"\n";
7290 Breakdown_file <<
"Viscous and Inviscid flow: rho_ref, vel_ref, and temp_ref" <<
"\n";
7291 Breakdown_file <<
"are user-provided reference values, p_ref = rho_ref*vel_ref^2." <<
"\n";
7292 if (grid_movement) Breakdown_file <<
"Force coefficients computed using MACH_MOTION." <<
"\n";
7293 else Breakdown_file <<
"Force coefficients computed using reference values." <<
"\n";
7295 Breakdown_file <<
"The reference area for force coeffs. is " << config[val_iZone]->GetRefArea() <<
" m^2." <<
"\n";
7296 Breakdown_file <<
"The reference length for force coeffs. is " << config[val_iZone]->GetRefLength() <<
" m." <<
"\n";
7298 Breakdown_file <<
"The pressure is decomposed into thermodynamic and dynamic components." <<
"\n";
7299 Breakdown_file <<
"The initial value of the dynamic pressure is 0." <<
"\n";
7301 Breakdown_file <<
"Mach number: "<< config[val_iZone]->GetMach();
7303 Breakdown_file <<
", computed using the Bulk modulus." <<
"\n";
7305 Breakdown_file <<
", computed using fluid speed of sound." <<
"\n";
7308 Breakdown_file <<
"For external flows, the initial state is imposed at the far-field." <<
"\n";
7309 Breakdown_file <<
"Angle of attack (deg): "<< config[val_iZone]->GetAoA() <<
", computed using the initial velocity." <<
"\n";
7310 Breakdown_file <<
"Side slip angle (deg): "<< config[val_iZone]->GetAoS() <<
", computed using the initial velocity." <<
"\n";
7313 Breakdown_file <<
"Reynolds number per meter: " << config[val_iZone]->GetReynolds() <<
", computed using initial values."<<
"\n";
7314 Breakdown_file <<
"Reynolds number is a byproduct of inputs only (not used internally)." <<
"\n";
7316 Breakdown_file <<
"SI units only. The grid should be dimensional (meters)." <<
"\n";
7318 switch (config[val_iZone]->GetKind_DensityModel()) {
7321 if (energy) Breakdown_file <<
"Energy equation is active and decoupled." <<
"\n";
7322 else Breakdown_file <<
"No energy equation." <<
"\n";
7326 if (energy) Breakdown_file <<
"Energy equation is active and coupled through Boussinesq approx." <<
"\n";
7330 if (energy) Breakdown_file <<
"Energy equation is active and coupled for variable density." <<
"\n";
7335 Breakdown_file <<
"-- Input conditions:"<<
"\n";
7337 switch (config[val_iZone]->GetKind_FluidModel()) {
7340 Breakdown_file <<
"Fluid Model: CONSTANT_DENSITY "<<
"\n";
7342 Breakdown_file <<
"Specific heat at constant pressure (Cp): " << config[val_iZone]->GetSpecific_Heat_Cp() <<
" N.m/kg.K." <<
"\n";
7344 if (boussinesq) Breakdown_file <<
"Thermal expansion coefficient: " << config[val_iZone]->GetThermal_Expansion_Coeff() <<
" K^-1." <<
"\n";
7345 Breakdown_file <<
"Thermodynamic pressure not required." <<
"\n";
7349 Breakdown_file <<
"Fluid Model: INC_IDEAL_GAS "<< endl;
7350 Breakdown_file <<
"Variable density incompressible flow using ideal gas law." << endl;
7351 Breakdown_file <<
"Density is a function of temperature (constant thermodynamic pressure)." << endl;
7352 Breakdown_file <<
"Specific heat at constant pressure (Cp): " << config[val_iZone]->GetSpecific_Heat_Cp() <<
" N.m/kg.K." << endl;
7353 Breakdown_file <<
"Molecular weight : "<< config[val_iZone]->GetMolecular_Weight() <<
" g/mol" << endl;
7354 Breakdown_file <<
"Specific gas constant: " << config[val_iZone]->GetGas_Constant() <<
" N.m/kg.K." << endl;
7355 Breakdown_file <<
"Thermodynamic pressure: " << config[val_iZone]->GetPressure_Thermodynamic();
7356 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" Pa." << endl;
7357 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" psf." << endl;
7362 switch (config[val_iZone]->GetKind_ViscosityModel()) {
7365 Breakdown_file <<
"Viscosity Model: CONSTANT_VISCOSITY "<<
"\n";
7366 Breakdown_file <<
"Constant Laminar Viscosity: " << config[val_iZone]->GetMu_Constant();
7367 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" N.s/m^2." <<
"\n";
7368 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" lbf.s/ft^2." <<
"\n";
7369 Breakdown_file <<
"Laminar Viscosity (non-dim): " << config[val_iZone]->GetMu_ConstantND()<<
"\n";
7373 Breakdown_file <<
"Viscosity Model: SUTHERLAND "<<
"\n";
7374 Breakdown_file <<
"Ref. Laminar Viscosity: " << config[val_iZone]->GetMu_Ref();
7375 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" N.s/m^2." <<
"\n";
7376 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" lbf.s/ft^2." <<
"\n";
7377 Breakdown_file <<
"Ref. Temperature: " << config[val_iZone]->GetMu_Temperature_Ref();
7378 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" K." <<
"\n";
7379 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" R." <<
"\n";
7380 Breakdown_file <<
"Sutherland Constant: "<< config[val_iZone]->GetMu_S();
7381 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" K." <<
"\n";
7382 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" R." <<
"\n";
7383 Breakdown_file <<
"Laminar Viscosity (non-dim): " << config[val_iZone]->GetMu_ConstantND()<<
"\n";
7384 Breakdown_file <<
"Ref. Temperature (non-dim): " << config[val_iZone]->GetMu_Temperature_RefND()<<
"\n";
7385 Breakdown_file <<
"Sutherland constant (non-dim): "<< config[val_iZone]->GetMu_SND()<<
"\n";
7391 switch (config[val_iZone]->GetKind_ConductivityModel()) {
7394 Breakdown_file <<
"Conductivity Model: CONSTANT_PRANDTL "<<
"\n";
7395 Breakdown_file <<
"Prandtl (Laminar): " << config[val_iZone]->GetPrandtl_Lam()<<
"\n";
7396 Breakdown_file <<
"Prandtl (Turbulent): " << config[val_iZone]->GetPrandtl_Turb()<<
"\n";
7400 Breakdown_file <<
"Conductivity Model: CONSTANT_CONDUCTIVITY "<<
"\n";
7401 Breakdown_file <<
"Molecular Conductivity: " << config[val_iZone]->GetKt_Constant()<<
" W/m^2.K." <<
"\n";
7402 Breakdown_file <<
"Molecular Conductivity (non-dim): " << config[val_iZone]->GetKt_ConstantND()<<
"\n";
7411 Breakdown_file <<
"Bulk modulus: " << config[val_iZone]->GetBulk_Modulus();
7412 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" Pa." <<
"\n";
7413 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" psf." <<
"\n";
7416 Breakdown_file <<
"Initial dynamic pressure: " << config[val_iZone]->GetPressure_FreeStream();
7417 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" Pa." <<
"\n";
7418 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" psf." <<
"\n";
7420 Breakdown_file <<
"Initial total pressure: " << config[val_iZone]->GetPressure_FreeStream() + 0.5*config[val_iZone]->GetDensity_FreeStream()*config[val_iZone]->GetModVel_FreeStream()*config[val_iZone]->GetModVel_FreeStream();
7421 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" Pa." <<
"\n";
7422 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" psf." <<
"\n";
7425 Breakdown_file <<
"Initial temperature: " << config[val_iZone]->GetTemperature_FreeStream();
7426 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" K." <<
"\n";
7427 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" R." <<
"\n";
7430 Breakdown_file <<
"Initial density: " << config[val_iZone]->GetDensity_FreeStream();
7431 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" kg/m^3." <<
"\n";
7432 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" slug/ft^3." <<
"\n";
7435 Breakdown_file <<
"Initial velocity: (" << config[val_iZone]->GetVelocity_FreeStream()[0] <<
", ";
7436 Breakdown_file << config[val_iZone]->GetVelocity_FreeStream()[1] <<
")";
7439 Breakdown_file <<
"Initial velocity: (" << config[val_iZone]->GetVelocity_FreeStream()[0] <<
", ";
7440 Breakdown_file << config[val_iZone]->GetVelocity_FreeStream()[1] <<
", " << config[val_iZone]->GetVelocity_FreeStream()[2] <<
")";
7442 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" m/s. ";
7443 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" ft/s. ";
7445 Breakdown_file <<
"Magnitude: " << config[val_iZone]->GetModVel_FreeStream();
7446 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" m/s." <<
"\n";
7447 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" ft/s." <<
"\n";
7450 Breakdown_file <<
"Initial laminar viscosity: " << config[val_iZone]->GetViscosity_FreeStream();
7451 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" N.s/m^2." <<
"\n";
7452 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" lbf.s/ft^2." <<
"\n";
7454 Breakdown_file <<
"Initial turb. kinetic energy per unit mass: " << config[val_iZone]->GetTke_FreeStream();
7455 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" m^2/s^2." <<
"\n";
7456 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" ft^2/s^2." <<
"\n";
7457 Breakdown_file <<
"Initial specific dissipation: " << config[val_iZone]->GetOmega_FreeStream();
7458 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" 1/s." <<
"\n";
7459 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" 1/s." <<
"\n";
7463 if (unsteady) { Breakdown_file <<
"Total time: " << config[val_iZone]->GetTotal_UnstTime() <<
" s. Time step: " << config[val_iZone]->GetDelta_UnstTime() <<
" s." <<
"\n"; }
7467 Breakdown_file <<
"-- Reference values:"<<
"\n";
7470 Breakdown_file <<
"Reference specific gas constant: " << config[val_iZone]->GetGas_Constant_Ref();
7471 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" N.m/kg.K." <<
"\n";
7472 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" lbf.ft/slug.R." <<
"\n";
7475 Breakdown_file <<
"Reference specific heat: " << config[val_iZone]->GetGas_Constant_Ref();
7476 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" N.m/kg.K." <<
"\n";
7477 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" lbf.ft/slug.R." <<
"\n";
7481 Breakdown_file <<
"Reference pressure: " << config[val_iZone]->GetPressure_Ref();
7482 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" Pa." <<
"\n";
7483 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" psf." <<
"\n";
7486 Breakdown_file <<
"Reference temperature: " << config[val_iZone]->GetTemperature_Ref();
7487 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" K." <<
"\n";
7488 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" R." <<
"\n";
7491 Breakdown_file <<
"Reference density: " << config[val_iZone]->GetDensity_Ref();
7492 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" kg/m^3." <<
"\n";
7493 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" slug/ft^3." <<
"\n";
7495 Breakdown_file <<
"Reference velocity: " << config[val_iZone]->GetVelocity_Ref();
7496 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" m/s." <<
"\n";
7497 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" ft/s." <<
"\n";
7499 Breakdown_file <<
"Reference length: " << config[val_iZone]->GetLength_Ref();
7500 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" m." <<
"\n";
7501 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" in." <<
"\n";
7504 Breakdown_file <<
"Reference viscosity: " << config[val_iZone]->GetViscosity_Ref();
7505 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" N.s/m^2." <<
"\n";
7506 else if (config[val_iZone]->GetSystemMeasurements() ==
US) Breakdown_file <<
" lbf.s/ft^2." <<
"\n";
7509 if (unsteady) Breakdown_file <<
"Reference time: " << config[val_iZone]->GetTime_Ref() <<
" s." <<
"\n";
7513 Breakdown_file <<
"-- Resulting non-dimensional state:" <<
"\n";
7514 Breakdown_file <<
"Mach number (non-dim): " << config[val_iZone]->GetMach() <<
"\n";
7516 Breakdown_file <<
"Reynolds number (per m): " << config[val_iZone]->GetReynolds() <<
"\n";
7520 Breakdown_file <<
"Specific gas constant (non-dim): " << config[val_iZone]->GetGas_ConstantND() <<
"\n";
7521 Breakdown_file <<
"Initial thermodynamic pressure (non-dim): " << config[val_iZone]->GetPressure_ThermodynamicND() <<
"\n";
7524 Breakdown_file <<
"Specific heat at constant pressure (non-dim): " << config[val_iZone]->GetSpecific_Heat_CpND() <<
"\n";
7525 if (boussinesq) Breakdown_file <<
"Thermal expansion coefficient (non-dim.): " << config[val_iZone]->GetThermal_Expansion_CoeffND() <<
" K^-1." <<
"\n";
7529 if (energy) Breakdown_file <<
"Initial temperature (non-dim): " << config[val_iZone]->GetTemperature_FreeStreamND() <<
"\n";
7530 Breakdown_file <<
"Initial pressure (non-dim): " << config[val_iZone]->GetPressure_FreeStreamND() <<
"\n";
7531 Breakdown_file <<
"Initial density (non-dim): " << config[val_iZone]->GetDensity_FreeStreamND() <<
"\n";
7534 Breakdown_file <<
"Initial velocity (non-dim): (" << config[val_iZone]->GetVelocity_FreeStreamND()[0] <<
", ";
7535 Breakdown_file << config[val_iZone]->GetVelocity_FreeStreamND()[1] <<
"). ";
7537 Breakdown_file <<
"Initial velocity (non-dim): (" << config[val_iZone]->GetVelocity_FreeStreamND()[0] <<
", ";
7538 Breakdown_file << config[val_iZone]->GetVelocity_FreeStreamND()[1] <<
", " << config[val_iZone]->GetVelocity_FreeStreamND()[2] <<
"). ";
7540 Breakdown_file <<
"Magnitude: " << config[val_iZone]->GetModVel_FreeStreamND() <<
"\n";
7543 Breakdown_file <<
"Initial viscosity (non-dim): " << config[val_iZone]->GetViscosity_FreeStreamND() <<
"\n";
7545 Breakdown_file <<
"Initial turb. kinetic energy (non-dim): " << config[val_iZone]->GetTke_FreeStreamND() <<
"\n";
7546 Breakdown_file <<
"Initial specific dissipation (non-dim): " << config[val_iZone]->GetOmega_FreeStreamND() <<
"\n";
7551 Breakdown_file <<
"Total time (non-dim): " << config[val_iZone]->GetTotal_UnstTimeND() <<
"\n";
7552 Breakdown_file <<
"Time step (non-dim): " << config[val_iZone]->GetDelta_UnstTimeND() <<
"\n";
7559 Breakdown_file << fixed;
7560 Breakdown_file <<
"\n" <<
"\n" <<
"Forces breakdown:" <<
"\n" <<
"\n";
7564 su2double term = (Total_CoPz/m)-Total_CoPx;
7566 if (term > 0) Breakdown_file <<
"Center of Pressure: X=" << 1/m <<
"Z-"<< term <<
"." <<
"\n\n";
7567 else Breakdown_file <<
"Center of Pressure: X=" << 1/m <<
"Z+"<< fabs(term);
7568 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" m." <<
"\n\n";
7569 else Breakdown_file <<
" in." <<
"\n\n";
7573 su2double term = (Total_CoPy/m)-Total_CoPx;
7574 if (term > 0) Breakdown_file <<
"Center of Pressure: X=" << 1/m <<
"Y-"<< term <<
"." <<
"\n\n";
7575 else Breakdown_file <<
"Center of Pressure: X=" << 1/m <<
"Y+"<< fabs(term);
7576 if (config[val_iZone]->GetSystemMeasurements() ==
SI) Breakdown_file <<
" m." <<
"\n\n";
7577 else Breakdown_file <<
" in." <<
"\n\n";
7582 su2double RefDensity, RefArea, RefVel, Factor, Ref;
7583 RefArea = config[val_iZone]->GetRefArea();
7588 if ((config[val_iZone]->GetRef_Inc_NonDim() ==
DIMENSIONAL) ||
7592 for (iDim = 0; iDim < nDim; iDim++)
7594 RefVel = sqrt(RefVel);
7596 RefDensity = config[val_iZone]->GetInc_Density_Ref();
7597 RefVel = config[val_iZone]->GetInc_Velocity_Ref();
7600 Factor = (0.5*RefDensity*RefArea*RefVel*RefVel);
7601 Ref = config[val_iZone]->GetDensity_Ref() * config[val_iZone]->GetVelocity_Ref() * config[val_iZone]->GetVelocity_Ref() * 1.0 * 1.0;
7603 Breakdown_file <<
"NOTE: Multiply forces by the non-dimensional factor: " << Factor <<
", and the reference factor: " << Ref <<
"\n";
7604 Breakdown_file <<
"to obtain the dimensional force." <<
"\n" <<
"\n";
7606 Breakdown_file <<
"Total CL: ";
7607 Breakdown_file.precision(15);
7608 Breakdown_file.width(18);
7609 Breakdown_file << Total_CL;
7610 Breakdown_file <<
" | Pressure (";
7611 Breakdown_file.width(5);
7613 Breakdown_file <<
"%): ";
7614 Breakdown_file.width(18);
7615 Breakdown_file << Inv_CL;
7616 Breakdown_file <<
" | Friction (";
7617 Breakdown_file.width(5);
7619 Breakdown_file <<
"%): ";
7620 Breakdown_file.width(18);
7621 Breakdown_file << Visc_CL;
7622 Breakdown_file <<
" | Momentum (";
7623 Breakdown_file.width(5);
7625 Breakdown_file <<
"%): ";
7626 Breakdown_file.width(18);
7627 Breakdown_file << Mnt_CL <<
"\n";
7629 Breakdown_file <<
"Total CD: ";
7630 Breakdown_file.width(18);
7631 Breakdown_file << Total_CD;
7632 Breakdown_file <<
" | Pressure (";
7633 Breakdown_file.width(5);
7634 Breakdown_file <<
SU2_TYPE::Int((Inv_CD * 100.0) / (Total_CD +
EPS)) <<
"%): ";
7635 Breakdown_file.width(18);
7636 Breakdown_file << Inv_CD;
7637 Breakdown_file <<
" | Friction (";
7638 Breakdown_file.width(5);
7639 Breakdown_file <<
SU2_TYPE::Int((Visc_CD * 100.0) / (Total_CD +
EPS)) <<
"%): ";
7640 Breakdown_file.width(18);
7641 Breakdown_file << Visc_CD;
7642 Breakdown_file <<
" | Momentum (";
7643 Breakdown_file.width(5);
7644 Breakdown_file <<
SU2_TYPE::Int((Mnt_CD * 100.0) / (Total_CD +
EPS)) <<
"%): ";
7645 Breakdown_file.width(18);
7646 Breakdown_file << Mnt_CD <<
"\n";
7649 Breakdown_file <<
"Total CSF: ";
7650 Breakdown_file.width(18);
7651 Breakdown_file << Total_CSF;
7652 Breakdown_file <<
" | Pressure (";
7653 Breakdown_file.width(5);
7655 Breakdown_file <<
"%): ";
7656 Breakdown_file.width(18);
7657 Breakdown_file << Inv_CSF;
7658 Breakdown_file <<
" | Friction (";
7659 Breakdown_file.width(5);
7661 Breakdown_file <<
"%): ";
7662 Breakdown_file.width(18);
7663 Breakdown_file << Visc_CSF;
7664 Breakdown_file <<
" | Momentum (";
7665 Breakdown_file.width(5);
7667 Breakdown_file <<
"%): ";
7668 Breakdown_file.width(18);
7669 Breakdown_file << Mnt_CSF <<
"\n";
7672 Breakdown_file <<
"Total CL/CD: ";
7673 Breakdown_file.width(18);
7674 Breakdown_file << Total_CEff;
7675 Breakdown_file <<
" | Pressure (";
7676 Breakdown_file.width(5);
7678 Breakdown_file <<
"%): ";
7679 Breakdown_file.width(18);
7680 Breakdown_file << Inv_CEff;
7681 Breakdown_file <<
" | Friction (";
7682 Breakdown_file.width(5);
7684 Breakdown_file <<
"%): ";
7685 Breakdown_file.width(18);
7686 Breakdown_file << Visc_CEff;
7687 Breakdown_file <<
" | Momentum (";
7688 Breakdown_file.width(5);
7690 Breakdown_file <<
"%): ";
7691 Breakdown_file.width(18);
7692 Breakdown_file << Mnt_CEff <<
"\n";
7695 Breakdown_file <<
"Total CMx: ";
7696 Breakdown_file.width(18);
7697 Breakdown_file << Total_CMx;
7698 Breakdown_file <<
" | Pressure (";
7699 Breakdown_file.width(5);
7701 Breakdown_file <<
"%): ";
7702 Breakdown_file.width(18);
7703 Breakdown_file << Inv_CMx;
7704 Breakdown_file <<
" | Friction (";
7705 Breakdown_file.width(5);
7707 Breakdown_file <<
"%): ";
7708 Breakdown_file.width(18);
7709 Breakdown_file << Visc_CMx;
7710 Breakdown_file <<
" | Momentum (";
7711 Breakdown_file.width(5);
7713 Breakdown_file <<
"%): ";
7714 Breakdown_file.width(18);
7715 Breakdown_file << Mnt_CMx <<
"\n";
7717 Breakdown_file <<
"Total CMy: ";
7718 Breakdown_file.width(18);
7719 Breakdown_file << Total_CMy;
7720 Breakdown_file <<
" | Pressure (";
7721 Breakdown_file.width(5);
7723 Breakdown_file <<
"%): ";
7724 Breakdown_file.width(18);
7725 Breakdown_file << Inv_CMy;
7726 Breakdown_file <<
" | Friction (";
7727 Breakdown_file.width(5);
7729 Breakdown_file <<
"%): ";
7730 Breakdown_file.width(18);
7731 Breakdown_file << Visc_CMy;
7732 Breakdown_file <<
" | Momentum (";
7733 Breakdown_file.width(5);
7735 Breakdown_file <<
"%): ";
7736 Breakdown_file.width(18);
7737 Breakdown_file << Mnt_CMy <<
"\n";
7740 Breakdown_file <<
"Total CMz: ";
7741 Breakdown_file.width(18);
7742 Breakdown_file << Total_CMz;
7743 Breakdown_file <<
" | Pressure (";
7744 Breakdown_file.width(5);
7746 Breakdown_file <<
"%): ";
7747 Breakdown_file.width(18);
7748 Breakdown_file << Inv_CMz;
7749 Breakdown_file <<
" | Friction (";
7750 Breakdown_file.width(5);
7752 Breakdown_file <<
"%): ";
7753 Breakdown_file.width(18);
7754 Breakdown_file << Visc_CMz;
7755 Breakdown_file <<
" | Momentum (";
7756 Breakdown_file.width(5);
7758 Breakdown_file <<
"%): ";
7759 Breakdown_file.width(18);
7760 Breakdown_file << Mnt_CMz <<
"\n";
7762 Breakdown_file <<
"Total CFx: ";
7763 Breakdown_file.width(18);
7764 Breakdown_file << Total_CFx;
7765 Breakdown_file <<
" | Pressure (";
7766 Breakdown_file.width(5);
7768 Breakdown_file <<
"%): ";
7769 Breakdown_file.width(18);
7770 Breakdown_file << Inv_CFx;
7771 Breakdown_file <<
" | Friction (";
7772 Breakdown_file.width(5);
7774 Breakdown_file <<
"%): ";
7775 Breakdown_file.width(18);
7776 Breakdown_file << Visc_CFx;
7777 Breakdown_file <<
" | Momentum (";
7778 Breakdown_file.width(5);
7780 Breakdown_file <<
"%): ";
7781 Breakdown_file.width(18);
7782 Breakdown_file << Mnt_CFx <<
"\n";
7784 Breakdown_file <<
"Total CFy: ";
7785 Breakdown_file.width(18);
7786 Breakdown_file << Total_CFy;
7787 Breakdown_file <<
" | Pressure (";
7788 Breakdown_file.width(5);
7790 Breakdown_file <<
"%): ";
7791 Breakdown_file.width(18);
7792 Breakdown_file << Inv_CFy;
7793 Breakdown_file <<
" | Friction (";
7794 Breakdown_file.width(5);
7796 Breakdown_file <<
"%): ";
7797 Breakdown_file.width(18);
7798 Breakdown_file << Visc_CFy;
7799 Breakdown_file <<
" | Momentum (";
7800 Breakdown_file.width(5);
7802 Breakdown_file <<
"%): ";
7803 Breakdown_file.width(18);
7804 Breakdown_file << Mnt_CFy <<
"\n";
7807 Breakdown_file <<
"Total CFz: ";
7808 Breakdown_file.width(18);
7809 Breakdown_file << Total_CFz;
7810 Breakdown_file <<
" | Pressure (";
7811 Breakdown_file.width(5);
7813 Breakdown_file <<
"%): ";
7814 Breakdown_file.width(18);
7815 Breakdown_file << Inv_CFz;
7816 Breakdown_file <<
" | Friction (";
7817 Breakdown_file.width(5);
7819 Breakdown_file <<
"%): ";
7820 Breakdown_file.width(18);
7821 Breakdown_file << Visc_CFz;
7822 Breakdown_file <<
" | Momentum (";
7823 Breakdown_file.width(5);
7825 Breakdown_file <<
"%): ";
7826 Breakdown_file.width(18);
7827 Breakdown_file << Mnt_CFz <<
"\n";
7830 Breakdown_file <<
"\n" <<
"\n";
7832 for (iMarker_Monitoring = 0;
7833 iMarker_Monitoring < config[val_iZone]->GetnMarker_Monitoring();
7834 iMarker_Monitoring++) {
7836 Breakdown_file <<
"Surface name: "
7837 << config[val_iZone]->GetMarker_Monitoring_TagBound(
7838 iMarker_Monitoring) <<
"\n" <<
"\n";
7840 Breakdown_file <<
"Total CL (";
7841 Breakdown_file.width(5);
7844 (Surface_CL[iMarker_Monitoring] * 100.0)
7845 / (Total_CL +
EPS));
7846 Breakdown_file <<
"%): ";
7847 Breakdown_file.width(18);
7848 Breakdown_file << Surface_CL[iMarker_Monitoring];
7849 Breakdown_file <<
" | Pressure (";
7850 Breakdown_file.width(5);
7853 (Surface_CL_Inv[iMarker_Monitoring] * 100.0)
7854 / (Surface_CL[iMarker_Monitoring] +
EPS));
7855 Breakdown_file <<
"%): ";
7856 Breakdown_file.width(18);
7857 Breakdown_file << Surface_CL_Inv[iMarker_Monitoring];
7858 Breakdown_file <<
" | Friction (";
7859 Breakdown_file.width(5);
7862 (Surface_CL_Visc[iMarker_Monitoring] * 100.0)
7863 / (Surface_CL[iMarker_Monitoring] +
EPS));
7864 Breakdown_file <<
"%): ";
7865 Breakdown_file.width(18);
7866 Breakdown_file << Surface_CL_Visc[iMarker_Monitoring];
7867 Breakdown_file <<
" | Momentum (";
7868 Breakdown_file.width(5);
7871 (Surface_CL_Mnt[iMarker_Monitoring] * 100.0)
7872 / (Surface_CL[iMarker_Monitoring] +
EPS));
7873 Breakdown_file <<
"%): ";
7874 Breakdown_file.width(18);
7875 Breakdown_file << Surface_CL_Mnt[iMarker_Monitoring] <<
"\n";
7877 Breakdown_file <<
"Total CD (";
7878 Breakdown_file.width(5);
7881 (Surface_CD[iMarker_Monitoring] * 100.0)
7882 / (Total_CD +
EPS));
7883 Breakdown_file <<
"%): ";
7884 Breakdown_file.width(18);
7885 Breakdown_file << Surface_CD[iMarker_Monitoring];
7886 Breakdown_file <<
" | Pressure (";
7887 Breakdown_file.width(5);
7890 (Surface_CD_Inv[iMarker_Monitoring] * 100.0)
7891 / (Surface_CD[iMarker_Monitoring] +
EPS));
7892 Breakdown_file <<
"%): ";
7893 Breakdown_file.width(18);
7894 Breakdown_file << Surface_CD_Inv[iMarker_Monitoring];
7895 Breakdown_file <<
" | Friction (";
7896 Breakdown_file.width(5);
7899 (Surface_CD_Visc[iMarker_Monitoring] * 100.0)
7900 / (Surface_CD[iMarker_Monitoring] +
EPS));
7901 Breakdown_file <<
"%): ";
7902 Breakdown_file.width(18);
7903 Breakdown_file << Surface_CD_Visc[iMarker_Monitoring];
7904 Breakdown_file <<
" | Momentum (";
7905 Breakdown_file.width(5);
7908 (Surface_CD_Mnt[iMarker_Monitoring] * 100.0)
7909 / (Surface_CD[iMarker_Monitoring] +
EPS));
7910 Breakdown_file <<
"%): ";
7911 Breakdown_file.width(18);
7912 Breakdown_file << Surface_CD_Mnt[iMarker_Monitoring] <<
"\n";
7915 Breakdown_file <<
"Total CSF (";
7916 Breakdown_file.width(5);
7919 (Surface_CSF[iMarker_Monitoring] * 100.0)
7920 / (Total_CSF +
EPS));
7921 Breakdown_file <<
"%): ";
7922 Breakdown_file.width(18);
7923 Breakdown_file << Surface_CSF[iMarker_Monitoring];
7924 Breakdown_file <<
" | Pressure (";
7925 Breakdown_file.width(5);
7928 (Surface_CSF_Inv[iMarker_Monitoring] * 100.0)
7929 / (Surface_CSF[iMarker_Monitoring] +
EPS));
7930 Breakdown_file <<
"%): ";
7931 Breakdown_file.width(18);
7932 Breakdown_file << Surface_CSF_Inv[iMarker_Monitoring];
7933 Breakdown_file <<
" | Friction (";
7934 Breakdown_file.width(5);
7937 (Surface_CSF_Visc[iMarker_Monitoring] * 100.0)
7938 / (Surface_CSF[iMarker_Monitoring] +
EPS));
7939 Breakdown_file <<
"%): ";
7940 Breakdown_file.width(18);
7942 << Surface_CSF_Visc[iMarker_Monitoring];
7943 Breakdown_file <<
" | Momentum (";
7944 Breakdown_file.width(5);
7947 (Surface_CSF_Mnt[iMarker_Monitoring] * 100.0)
7948 / (Surface_CSF[iMarker_Monitoring] +
EPS));
7949 Breakdown_file <<
"%): ";
7950 Breakdown_file.width(18);
7952 << Surface_CSF_Mnt[iMarker_Monitoring] <<
"\n";
7955 Breakdown_file <<
"Total CL/CD (";
7956 Breakdown_file.width(5);
7959 (Surface_CEff[iMarker_Monitoring] * 100.0) / (Total_CEff +
EPS));
7960 Breakdown_file <<
"%): ";
7961 Breakdown_file.width(18);
7962 Breakdown_file << Surface_CEff[iMarker_Monitoring];
7963 Breakdown_file <<
" | Pressure (";
7964 Breakdown_file.width(5);
7967 (Surface_CEff_Inv[iMarker_Monitoring] * 100.0)
7968 / (Surface_CEff[iMarker_Monitoring] +
EPS));
7969 Breakdown_file <<
"%): ";
7970 Breakdown_file.width(18);
7971 Breakdown_file << Surface_CEff_Inv[iMarker_Monitoring];
7972 Breakdown_file <<
" | Friction (";
7973 Breakdown_file.width(5);
7976 (Surface_CEff_Visc[iMarker_Monitoring] * 100.0)
7977 / (Surface_CEff[iMarker_Monitoring] +
EPS));
7978 Breakdown_file <<
"%): ";
7979 Breakdown_file.width(18);
7981 << Surface_CEff_Visc[iMarker_Monitoring];
7982 Breakdown_file <<
" | Momentum (";
7983 Breakdown_file.width(5);
7986 (Surface_CEff_Mnt[iMarker_Monitoring] * 100.0)
7987 / (Surface_CEff[iMarker_Monitoring] +
EPS));
7988 Breakdown_file <<
"%): ";
7989 Breakdown_file.width(18);
7991 << Surface_CEff_Mnt[iMarker_Monitoring] <<
"\n";
7995 Breakdown_file <<
"Total CMx (";
7996 Breakdown_file.width(5);
7999 (Surface_CMx[iMarker_Monitoring] * 100.0) / (Total_CMx +
EPS));
8000 Breakdown_file <<
"%): ";
8001 Breakdown_file.width(18);
8002 Breakdown_file << Surface_CMx[iMarker_Monitoring];
8003 Breakdown_file <<
" | Pressure (";
8004 Breakdown_file.width(5);
8007 (Surface_CMx_Inv[iMarker_Monitoring] * 100.0)
8008 / (Surface_CMx[iMarker_Monitoring] +
EPS));
8009 Breakdown_file <<
"%): ";
8010 Breakdown_file.width(18);
8011 Breakdown_file << Surface_CMx_Inv[iMarker_Monitoring];
8012 Breakdown_file <<
" | Friction (";
8013 Breakdown_file.width(5);
8016 (Surface_CMx_Visc[iMarker_Monitoring] * 100.0)
8017 / (Surface_CMx[iMarker_Monitoring] +
EPS));
8018 Breakdown_file <<
"%): ";
8019 Breakdown_file.width(18);
8021 << Surface_CMx_Visc[iMarker_Monitoring];
8022 Breakdown_file <<
" | Momentum (";
8023 Breakdown_file.width(5);
8026 (Surface_CMx_Mnt[iMarker_Monitoring] * 100.0)
8027 / (Surface_CMx[iMarker_Monitoring] +
EPS));
8028 Breakdown_file <<
"%): ";
8029 Breakdown_file.width(18);
8031 << Surface_CMx_Mnt[iMarker_Monitoring] <<
"\n";
8033 Breakdown_file <<
"Total CMy (";
8034 Breakdown_file.width(5);
8037 (Surface_CMy[iMarker_Monitoring] * 100.0) / (Total_CMy +
EPS));
8038 Breakdown_file <<
"%): ";
8039 Breakdown_file.width(18);
8040 Breakdown_file << Surface_CMy[iMarker_Monitoring];
8041 Breakdown_file <<
" | Pressure (";
8042 Breakdown_file.width(5);
8045 (Surface_CMy_Inv[iMarker_Monitoring] * 100.0)
8046 / (Surface_CMy[iMarker_Monitoring] +
EPS));
8047 Breakdown_file <<
"%): ";
8048 Breakdown_file.width(18);
8049 Breakdown_file << Surface_CMy_Inv[iMarker_Monitoring];
8050 Breakdown_file <<
" | Friction (";
8051 Breakdown_file.width(5);
8054 (Surface_CMy_Visc[iMarker_Monitoring] * 100.0)
8055 / (Surface_CMy[iMarker_Monitoring] +
EPS));
8056 Breakdown_file <<
"%): ";
8057 Breakdown_file.width(18);
8059 << Surface_CMy_Visc[iMarker_Monitoring];
8060 Breakdown_file <<
" | Momentum (";
8061 Breakdown_file.width(5);
8064 (Surface_CMy_Mnt[iMarker_Monitoring] * 100.0)
8065 / (Surface_CMy[iMarker_Monitoring] +
EPS));
8066 Breakdown_file <<
"%): ";
8067 Breakdown_file.width(18);
8069 << Surface_CMy_Mnt[iMarker_Monitoring] <<
"\n";
8072 Breakdown_file <<
"Total CMz (";
8073 Breakdown_file.width(5);
8075 <<
SU2_TYPE::Int((Surface_CMz[iMarker_Monitoring] * 100.0) / (Total_CMz +
EPS));
8076 Breakdown_file <<
"%): ";
8077 Breakdown_file.width(18);
8078 Breakdown_file << Surface_CMz[iMarker_Monitoring];
8079 Breakdown_file <<
" | Pressure (";
8080 Breakdown_file.width(5);
8083 (Surface_CMz_Inv[iMarker_Monitoring] * 100.0)
8084 / (Surface_CMz[iMarker_Monitoring] +
EPS));
8085 Breakdown_file <<
"%): ";
8086 Breakdown_file.width(18);
8087 Breakdown_file << Surface_CMz_Inv[iMarker_Monitoring];
8088 Breakdown_file <<
" | Friction (";
8089 Breakdown_file.width(5);
8092 (Surface_CMz_Visc[iMarker_Monitoring] * 100.0)
8093 / (Surface_CMz[iMarker_Monitoring] +
EPS));
8094 Breakdown_file <<
"%): ";
8095 Breakdown_file.width(18);
8097 << Surface_CMz_Visc[iMarker_Monitoring];
8098 Breakdown_file <<
" | Momentum (";
8099 Breakdown_file.width(5);
8102 (Surface_CMz_Mnt[iMarker_Monitoring] * 100.0)
8103 / (Surface_CMz[iMarker_Monitoring] +
EPS));
8104 Breakdown_file <<
"%): ";
8105 Breakdown_file.width(18);
8107 << Surface_CMz_Mnt[iMarker_Monitoring] <<
"\n";
8109 Breakdown_file <<
"Total CFx (";
8110 Breakdown_file.width(5);
8112 <<
SU2_TYPE::Int((Surface_CFx[iMarker_Monitoring] * 100.0) / (Total_CFx +
EPS));
8113 Breakdown_file <<
"%): ";
8114 Breakdown_file.width(18);
8115 Breakdown_file << Surface_CFx[iMarker_Monitoring];
8116 Breakdown_file <<
" | Pressure (";
8117 Breakdown_file.width(5);
8120 (Surface_CFx_Inv[iMarker_Monitoring] * 100.0)
8121 / (Surface_CFx[iMarker_Monitoring] +
EPS));
8122 Breakdown_file <<
"%): ";
8123 Breakdown_file.width(18);
8124 Breakdown_file << Surface_CFx_Inv[iMarker_Monitoring];
8125 Breakdown_file <<
" | Friction (";
8126 Breakdown_file.width(5);
8129 (Surface_CFx_Visc[iMarker_Monitoring] * 100.0)
8130 / (Surface_CFx[iMarker_Monitoring] +
EPS));
8131 Breakdown_file <<
"%): ";
8132 Breakdown_file.width(18);
8134 << Surface_CFx_Visc[iMarker_Monitoring];
8135 Breakdown_file <<
" | Momentum (";
8136 Breakdown_file.width(5);
8139 (Surface_CFx_Mnt[iMarker_Monitoring] * 100.0)
8140 / (Surface_CFx[iMarker_Monitoring] +
EPS));
8141 Breakdown_file <<
"%): ";
8142 Breakdown_file.width(18);
8144 << Surface_CFx_Mnt[iMarker_Monitoring] <<
"\n";
8146 Breakdown_file <<
"Total CFy (";
8147 Breakdown_file.width(5);
8149 <<
SU2_TYPE::Int((Surface_CFy[iMarker_Monitoring] * 100.0) / (Total_CFy +
EPS));
8150 Breakdown_file <<
"%): ";
8151 Breakdown_file.width(18);
8152 Breakdown_file << Surface_CFy[iMarker_Monitoring];
8153 Breakdown_file <<
" | Pressure (";
8154 Breakdown_file.width(5);
8157 (Surface_CFy_Inv[iMarker_Monitoring] * 100.0)
8158 / (Surface_CFy[iMarker_Monitoring] +
EPS));
8159 Breakdown_file <<
"%): ";
8160 Breakdown_file.width(18);
8161 Breakdown_file << Surface_CFy_Inv[iMarker_Monitoring];
8162 Breakdown_file <<
" | Friction (";
8163 Breakdown_file.width(5);
8166 (Surface_CFy_Visc[iMarker_Monitoring] * 100.0)
8167 / (Surface_CFy[iMarker_Monitoring] +
EPS));
8168 Breakdown_file <<
"%): ";
8169 Breakdown_file.width(18);
8171 << Surface_CFy_Visc[iMarker_Monitoring];
8172 Breakdown_file <<
" | Momentum (";
8173 Breakdown_file.width(5);
8176 (Surface_CFy_Mnt[iMarker_Monitoring] * 100.0)
8177 / (Surface_CFy[iMarker_Monitoring] +
EPS));
8178 Breakdown_file <<
"%): ";
8179 Breakdown_file.width(18);
8181 << Surface_CFy_Mnt[iMarker_Monitoring] <<
"\n";
8184 Breakdown_file <<
"Total CFz (";
8185 Breakdown_file.width(5);
8188 (Surface_CFz[iMarker_Monitoring] * 100.0) / (Total_CFz +
EPS));
8189 Breakdown_file <<
"%): ";
8190 Breakdown_file.width(18);
8191 Breakdown_file << Surface_CFz[iMarker_Monitoring];
8192 Breakdown_file <<
" | Pressure (";
8193 Breakdown_file.width(5);
8196 (Surface_CFz_Inv[iMarker_Monitoring] * 100.0)
8197 / (Surface_CFz[iMarker_Monitoring] +
EPS));
8198 Breakdown_file <<
"%): ";
8199 Breakdown_file.width(18);
8200 Breakdown_file << Surface_CFz_Inv[iMarker_Monitoring];
8201 Breakdown_file <<
" | Friction (";
8202 Breakdown_file.width(5);
8205 (Surface_CFz_Visc[iMarker_Monitoring] * 100.0)
8206 / (Surface_CFz[iMarker_Monitoring] +
EPS));
8207 Breakdown_file <<
"%): ";
8208 Breakdown_file.width(18);
8210 << Surface_CFz_Visc[iMarker_Monitoring];
8211 Breakdown_file <<
" | Momentum (";
8212 Breakdown_file.width(5);
8215 (Surface_CFz_Mnt[iMarker_Monitoring] * 100.0)
8216 / (Surface_CFz[iMarker_Monitoring] +
EPS));
8217 Breakdown_file <<
"%): ";
8218 Breakdown_file.width(18);
8220 << Surface_CFz_Mnt[iMarker_Monitoring] <<
"\n";
8224 Breakdown_file <<
"\n";
8229 delete [] Surface_CL;
8230 delete [] Surface_CD;
8231 delete [] Surface_CSF;
8232 delete [] Surface_CEff;
8233 delete [] Surface_CFx;
8234 delete [] Surface_CFy;
8235 delete [] Surface_CFz;
8236 delete [] Surface_CMx;
8237 delete [] Surface_CMy;
8238 delete [] Surface_CMz;
8240 delete [] Surface_CL_Inv;
8241 delete [] Surface_CD_Inv;
8242 delete [] Surface_CSF_Inv;
8243 delete [] Surface_CEff_Inv;
8244 delete [] Surface_CFx_Inv;
8245 delete [] Surface_CFy_Inv;
8246 delete [] Surface_CFz_Inv;
8247 delete [] Surface_CMx_Inv;
8248 delete [] Surface_CMy_Inv;
8249 delete [] Surface_CMz_Inv;
8251 delete [] Surface_CL_Visc;
8252 delete [] Surface_CD_Visc;
8253 delete [] Surface_CSF_Visc;
8254 delete [] Surface_CEff_Visc;
8255 delete [] Surface_CFx_Visc;
8256 delete [] Surface_CFy_Visc;
8257 delete [] Surface_CFz_Visc;
8258 delete [] Surface_CMx_Visc;
8259 delete [] Surface_CMy_Visc;
8260 delete [] Surface_CMz_Visc;
8262 delete [] Surface_CL_Mnt;
8263 delete [] Surface_CD_Mnt;
8264 delete [] Surface_CSF_Mnt;
8265 delete [] Surface_CEff_Mnt;
8266 delete [] Surface_CFx_Mnt;
8267 delete [] Surface_CFy_Mnt;
8268 delete [] Surface_CFz_Mnt;
8269 delete [] Surface_CMx_Mnt;
8270 delete [] Surface_CMy_Mnt;
8271 delete [] Surface_CMz_Mnt;
8273 Breakdown_file.close();
8280 unsigned long iExtIter,
unsigned short val_nZone) {
8282 unsigned short iZone;
8284 for (iZone = 0; iZone < val_nZone; iZone++) {
8303 if (
rank ==
MASTER_NODE) cout << endl <<
"Writing comma-separated values (CSV) surface files." << endl;
8305 switch (config[iZone]->GetKind_Solver()) {
8328 if (Wrt_Vol || Wrt_Srf) {
8329 if (
rank ==
MASTER_NODE) cout <<
"Merging connectivities in the Master node." << endl;
8337 if (
rank ==
MASTER_NODE) cout <<
"Merging coordinates in the Master node." << endl;
8342 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot binary volume and surface mesh files." << endl;
8345 if (!wrote_base_file)
8347 if (!wrote_surf_file)
8354 if (
rank ==
MASTER_NODE) cout <<
"Merging solution in the Master node." << endl;
8365 if (
rank ==
MASTER_NODE) cout <<
"Writing SU2 native restart file." << endl;
8370 switch (FileFormat) {
8376 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot ASCII file volume solution file." << endl;
8385 if (
rank ==
MASTER_NODE) cout <<
"Writing FieldView ASCII file volume solution file." << endl;
8394 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot binary volume solution file." << endl;
8402 if (
rank ==
MASTER_NODE) cout <<
"Writing FieldView binary file volume solution file." << endl;
8411 if (
rank ==
MASTER_NODE) cout <<
"Writing Paraview ASCII volume solution file." << endl;
8420 if (
rank ==
MASTER_NODE) cout <<
"ParaView binary volume files not available in this mode." << endl;
8421 if (
rank ==
MASTER_NODE) cout <<
" Writing ParaView ASCII volume solution file instead." << endl;
8434 switch (FileFormat) {
8440 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot ASCII surface solution file." << endl;
8449 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot binary surface solution file." << endl;
8457 if (
rank ==
MASTER_NODE) cout <<
"Writing Paraview ASCII surface solution file." << endl;
8466 if (
rank ==
MASTER_NODE) cout <<
"ParaView binary surface files not available in this mode." << endl;
8467 if (
rank ==
MASTER_NODE) cout <<
" Writing ParaView ASCII surface solution file instead." << endl;
8497 unsigned long iExtIter,
unsigned short val_nZone) {
8499 unsigned short iZone, iInst, nInst;
8501 for (iZone = 0; iZone < val_nZone; iZone++) {
8505 for (iInst = 0; iInst < nInst; iInst++) {
8512 if (config[iZone]->GetKind_SU2() ==
SU2_DOT) { Wrt_Vol =
false; }
8523 if ((Wrt_Vol || Wrt_Srf)) {
8524 if (
rank ==
MASTER_NODE) cout <<
"Merging connectivities in the Master node." << endl;
8530 if ((Wrt_Vol || Wrt_Srf)) {
8531 if (
rank ==
MASTER_NODE) cout <<
"Merging solution in the Master node." << endl;
8544 switch (FileFormat) {
8550 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot ASCII file (volume grid)." << endl;
8551 SetTecplotASCII(config[iZone], geometry[iZone][iInst], &solver[iZone][iInst], iZone, val_nZone,
false);
8559 if (
rank ==
MASTER_NODE) cout <<
"Writing FieldView ASCII file (volume grid)." << endl;
8568 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot Binary file (volume grid)." << endl;
8577 if (
rank ==
MASTER_NODE) cout <<
"Writing FieldView ASCII file (volume grid)." << endl;
8586 if (
rank ==
MASTER_NODE) cout <<
"Writing Paraview ASCII file (volume grid)." << endl;
8587 SetParaview_ASCII(config[iZone], geometry[iZone][iInst], iZone, val_nZone,
false);
8595 if (
rank ==
MASTER_NODE) cout <<
"ParaView binary volume files not available in this mode." << endl;
8596 if (
rank ==
MASTER_NODE) cout <<
" Writing ParaView ASCII volume solution file instead." << endl;
8597 SetParaview_ASCII(config[iZone], geometry[iZone][iInst], iZone, val_nZone,
false);
8609 switch (FileFormat) {
8615 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot ASCII file (surface grid)." << endl;
8616 SetTecplotASCII(config[iZone], geometry[iZone][iInst], &solver[iZone][iInst], iZone, val_nZone,
true);
8624 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot Binary file (surface grid)." << endl;
8633 if (
rank ==
MASTER_NODE) cout <<
"Writing Paraview ASCII file (surface grid)." << endl;
8634 SetParaview_ASCII(config[iZone], geometry[iZone][iInst], iZone, val_nZone,
true);
8642 if (
rank ==
MASTER_NODE) cout <<
"ParaView binary surface files not available in this mode." << endl;
8643 if (
rank ==
MASTER_NODE) cout <<
" Writing ParaView ASCII surface solution file instead." << endl;
8644 SetParaview_ASCII(config[iZone], geometry[iZone][iInst], iZone, val_nZone,
true);
8654 if (!wrote_base_file)
8656 if (!wrote_surf_file)
8660 if (Wrt_Vol || Wrt_Srf)
8681 unsigned short iZone;
8682 ofstream output_file;
8690 strcpy (out_file, str.c_str());
8691 strcpy (cstr, out_file);
8692 output_file.precision(15);
8693 output_file.open(cstr, ios::out);
8694 if (val_nZone > 1) {
8695 output_file <<
"NZONE= " << val_nZone << endl;
8700 for (iZone = 0; iZone < val_nZone; iZone++) {
8734 if (config[iZone]->GetOutput_FileFormat() ==
PARAVIEW)
SetParaview_MeshASCII(config[iZone], geometry[iZone], iZone, val_nZone,
false, new_file);
8736 if (
rank ==
MASTER_NODE) cout <<
"Writing ASCII paraview volume mesh file by default." << endl;
8739 else if (config[iZone]->GetOutput_FileFormat() ==
TECPLOT)
SetTecplotASCII_Mesh(config[iZone], geometry[iZone], iZone,
false, new_file);
8740 else if (config[iZone]->GetOutput_FileFormat() ==
TECPLOT_BINARY) {
8741 if (
rank ==
MASTER_NODE) cout <<
"Writing ASCII tecplot volume mesh file by default." << endl;
8753 if (config[iZone]->GetOutput_FileFormat() ==
PARAVIEW)
SetParaview_MeshASCII(config[iZone], geometry[iZone], iZone, val_nZone,
true, new_file);
8755 if (
rank ==
MASTER_NODE) cout <<
"Writing ASCII paraview surface mesh file by default." << endl;
8758 else if (config[iZone]->GetOutput_FileFormat() ==
TECPLOT)
SetTecplotASCII_Mesh(config[iZone], geometry[iZone], iZone,
true, new_file);
8759 else if (config[iZone]->GetOutput_FileFormat() ==
TECPLOT_BINARY) {
8760 if (
rank ==
MASTER_NODE) cout <<
"Writing ASCII tecplot surface mesh file by default." << endl;
8785 if (
rank ==
MASTER_NODE) cout <<
"Writing .dat binary coordinates file." << endl;
8815 output_file.close();
8822 short iSection, nSection;
8823 unsigned long iVertex, iPoint, Trailing_Point;
8824 su2double *Plane_P0, *Plane_P0_, *Plane_Normal, *Plane_Normal_, *CPressure,
8825 Force[3], ForceInviscid[3], MomentInviscid[3] =
8826 { 0.0, 0.0, 0.0 }, MomentDist[3] = { 0.0, 0.0, 0.0 }, RefDensity,
8827 RefPressure, RefArea, *Velocity_Inf, Gas_Constant, Mach2Vel,
8828 Mach_Motion, Gamma, RefVel2 = 0.0, factor, NDPressure, *Origin,
8829 RefLength, Alpha, CL_Inv,
8830 Xcoord_LeadingEdge = 0.0, Ycoord_LeadingEdge = 0.0, Zcoord_LeadingEdge = 0.0,
8831 Xcoord_TrailingEdge = 0.0, Ycoord_TrailingEdge = 0.0, Zcoord_TrailingEdge = 0.0,
8832 Xcoord_LeadingEdge_ = 0.0,
8833 Xcoord_TrailingEdge_ = 0.0, Ycoord_TrailingEdge_ = 0.0, Zcoord_TrailingEdge_ = 0.0,
8834 MaxDistance, Distance, Chord, Aux, Dihedral_Trailing;
8836 su2double B, Y, C_L, C_L0, Elliptic_Spanload;
8838 vector<su2double> Xcoord_Airfoil, Ycoord_Airfoil, Zcoord_Airfoil,
8840 vector<su2double> Xcoord_Airfoil_, Ycoord_Airfoil_, Zcoord_Airfoil_,
8842 string Marker_Tag, Slice_Filename, Slice_Ext;
8844 unsigned short iDim;
8855 cout << endl <<
"Writing the spanload file (load_distribution.dat).";
8869 if (grid_movement) {
8874 RefVel2 = (Mach_Motion * Mach2Vel) * (Mach_Motion * Mach2Vel);
8877 for (iDim = 0; iDim < geometry->
GetnDim(); iDim++)
8878 RefVel2 += Velocity_Inf[iDim] * Velocity_Inf[iDim];
8880 factor = 1.0 / (0.5 * RefDensity * RefArea * RefVel2);
8882 if (geometry->
GetnDim() == 3) {
8886 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
8888 - RefPressure) * factor * RefArea;
8893 for (iSection = 0; iSection < nSection; iSection++) {
8897 Plane_Normal[0] = 0.0; Plane_P0[0] = 0.0;
8898 Plane_Normal[1] = 0.0; Plane_P0[1] = 0.0;
8899 Plane_Normal[2] = 0.0; Plane_P0[2] = 0.0;
8902 Plane_Normal[0] = 1.0;
8906 Plane_Normal[0] = 0.0;
8913 su2double Plane_NormalX_Tilt = Plane_Normal[0]*cos(Tilt_Angle) + Plane_Normal[2]*sin(Tilt_Angle);
8914 su2double Plane_NormalY_Tilt = Plane_Normal[1];
8915 su2double Plane_NormalZ_Tilt = Plane_Normal[2]*cos(Tilt_Angle) - Plane_Normal[0]*sin(Tilt_Angle);
8920 su2double Plane_NormalX_Tilt_Toe = Plane_NormalX_Tilt*cos(Toe_Angle) - Plane_NormalY_Tilt*sin(Toe_Angle);
8921 su2double Plane_NormalY_Tilt_Toe = Plane_NormalX_Tilt*sin(Toe_Angle) + Plane_NormalY_Tilt*cos(Toe_Angle);
8922 su2double Plane_NormalZ_Tilt_Toe = Plane_NormalZ_Tilt;
8926 Plane_Normal[0] = Plane_NormalX_Tilt_Toe;
8927 Plane_Normal[1] = Plane_NormalY_Tilt_Toe;
8928 Plane_Normal[2] = Plane_NormalZ_Tilt_Toe;
8932 Plane_Normal[1] = 1.0;
8939 CPressure, Xcoord_Airfoil, Ycoord_Airfoil, Zcoord_Airfoil,
8940 CPressure_Airfoil,
true, config);
8944 cout << endl <<
"Please check the config file, the section (" << Plane_P0[0] <<
", " << Plane_P0[1] <<
", " << Plane_P0[2] <<
") has not been detected." << endl;
8946 cout << endl <<
"Please check the config file, the section (" << Plane_Normal[0] <<
", " << Plane_Normal[1] <<
", " << Plane_Normal[2] <<
") has not been detected." << endl;
8952 Plane_P0_[0] = 0.0; Plane_Normal_[0] = 0.0;
8953 Plane_P0_[1] = 0.0; Plane_Normal_[1] = 0.0;
8954 Plane_P0_[2] = 0.0; Plane_Normal_[2] = 0.0;
8957 Plane_Normal_[0] = 1.0;
8962 if (iSection == 0) {
8963 Plane_Normal_[0] = 0.0;
8970 su2double Plane_NormalX_Tilt = Plane_Normal[0]*cos(Tilt_Angle) + Plane_Normal[2]*sin(Tilt_Angle);
8971 su2double Plane_NormalY_Tilt = Plane_Normal[1];
8972 su2double Plane_NormalZ_Tilt = Plane_Normal[2]*cos(Tilt_Angle) - Plane_Normal[0]*sin(Tilt_Angle);
8977 su2double Plane_NormalX_Tilt_Toe = Plane_NormalX_Tilt*cos(Toe_Angle) - Plane_NormalY_Tilt*sin(Toe_Angle);
8978 su2double Plane_NormalY_Tilt_Toe = Plane_NormalX_Tilt*sin(Toe_Angle) + Plane_NormalY_Tilt*cos(Toe_Angle);
8979 su2double Plane_NormalZ_Tilt_Toe = Plane_NormalZ_Tilt;
8983 Plane_Normal[0] = Plane_NormalX_Tilt_Toe;
8984 Plane_Normal[1] = Plane_NormalY_Tilt_Toe;
8985 Plane_Normal[2] = Plane_NormalZ_Tilt_Toe;
8989 Plane_Normal_[0] = 0.0;
8996 su2double Plane_NormalX_Tilt = Plane_Normal[0]*cos(Tilt_Angle) + Plane_Normal[2]*sin(Tilt_Angle);
8997 su2double Plane_NormalY_Tilt = Plane_Normal[1];
8998 su2double Plane_NormalZ_Tilt = Plane_Normal[2]*cos(Tilt_Angle) - Plane_Normal[0]*sin(Tilt_Angle);
9003 su2double Plane_NormalX_Tilt_Toe = Plane_NormalX_Tilt*cos(Toe_Angle) - Plane_NormalY_Tilt*sin(Toe_Angle);
9004 su2double Plane_NormalY_Tilt_Toe = Plane_NormalX_Tilt*sin(Toe_Angle) + Plane_NormalY_Tilt*cos(Toe_Angle);
9005 su2double Plane_NormalZ_Tilt_Toe = Plane_NormalZ_Tilt;
9009 Plane_Normal[0] = Plane_NormalX_Tilt_Toe;
9010 Plane_Normal[1] = Plane_NormalY_Tilt_Toe;
9011 Plane_Normal[2] = Plane_NormalZ_Tilt_Toe;
9016 Plane_Normal_[1] = 1.0;
9022 CPressure, Xcoord_Airfoil_, Ycoord_Airfoil_, Zcoord_Airfoil_,
9023 CPressure_Airfoil_,
true, config);
9031 Xcoord_LeadingEdge = 1E6; Xcoord_TrailingEdge = -1E6;
9032 for (iVertex = 0; iVertex < Xcoord_Airfoil.size(); iVertex++) {
9033 if (Xcoord_Airfoil[iVertex] < Xcoord_LeadingEdge) {
9034 Xcoord_LeadingEdge = Xcoord_Airfoil[iVertex];
9035 Ycoord_LeadingEdge = Ycoord_Airfoil[iVertex];
9036 Zcoord_LeadingEdge = Zcoord_Airfoil[iVertex];
9038 if (Xcoord_Airfoil[iVertex] > Xcoord_TrailingEdge) {
9039 Xcoord_TrailingEdge = Xcoord_Airfoil[iVertex];
9040 Ycoord_TrailingEdge = Ycoord_Airfoil[iVertex];
9041 Zcoord_TrailingEdge = Zcoord_Airfoil[iVertex];
9045 Chord = (Xcoord_TrailingEdge-Xcoord_LeadingEdge);
9049 Xcoord_LeadingEdge_ = 1E6; Xcoord_TrailingEdge_ = -1E6;
9050 for (iVertex = 0; iVertex < Xcoord_Airfoil_.size(); iVertex++) {
9051 if (Xcoord_Airfoil_[iVertex] < Xcoord_LeadingEdge_) {
9052 Xcoord_LeadingEdge_ = Xcoord_Airfoil_[iVertex];
9054 if (Xcoord_Airfoil_[iVertex] > Xcoord_TrailingEdge_) {
9055 Xcoord_TrailingEdge_ = Xcoord_Airfoil_[iVertex];
9056 Ycoord_TrailingEdge_ = Ycoord_Airfoil_[iVertex];
9057 Zcoord_TrailingEdge_ = Zcoord_Airfoil_[iVertex];
9061 if (iSection == 0) {
9062 Dihedral_Trailing = atan((Zcoord_TrailingEdge_ - Zcoord_TrailingEdge) / (Ycoord_TrailingEdge_ - Ycoord_TrailingEdge))*180/
PI_NUMBER;
9065 Dihedral_Trailing = atan((Zcoord_TrailingEdge - Zcoord_TrailingEdge_) / (Ycoord_TrailingEdge - Ycoord_TrailingEdge_))*180/
PI_NUMBER;
9074 if (iSection == 0) {
9075 Cp_File.open(
"cp_sections.dat", ios::out);
9076 Cp_File <<
"TITLE = \"Airfoil sections\"" << endl;
9077 Cp_File <<
"VARIABLES = \"x/c\",\"C<sub>p</sub>\",\"x\",\"y\",\"z\",\"y/c\",\"z/c\"" << endl;
9079 Cp_File.open(
"cp_sections.dat", ios::app);
9083 Cp_File <<
"ZONE T=\"Theta = " << theta_deg <<
" deg\", I= " << Xcoord_Airfoil.size() <<
", F=POINT" <<
"\n";
9087 << Xcoord_Airfoil.size() <<
", F=POINT" <<
"\n";
9090 << Xcoord_Airfoil.size() <<
", F=POINT" <<
"\n";
9097 for (iVertex = 0; iVertex < Xcoord_Airfoil.size(); iVertex++) {
9099 su2double XCoord = Xcoord_Airfoil[iVertex];
9100 su2double YCoord = Ycoord_Airfoil[iVertex];
9101 su2double ZCoord = Zcoord_Airfoil[iVertex];
9110 YCoord = (Ycoord_Airfoil[iVertex]*cos(Angle) - Zcoord_Airfoil[iVertex]*sin(Angle)) + config->
GetNacelleLocation(1);
9111 ZCoord = (Zcoord_Airfoil[iVertex]*cos(Angle) + Ycoord_Airfoil[iVertex]*sin(Angle)) + config->
GetNacelleLocation(2);
9116 Cp_File << (Xcoord_Airfoil[iVertex] - Xcoord_LeadingEdge) / Chord <<
" " << CPressure_Airfoil[iVertex]
9117 <<
" " << XCoord * 12.0 <<
" " << YCoord * 12.0 <<
" " << ZCoord * 12.0
9118 <<
" " << (Ycoord_Airfoil[iVertex] - Ycoord_LeadingEdge) / Chord <<
" " << (Zcoord_Airfoil[iVertex] - Zcoord_LeadingEdge) / Chord <<
"\n";
9121 Cp_File << (Xcoord_Airfoil[iVertex] - Xcoord_LeadingEdge) / Chord <<
" " << CPressure_Airfoil[iVertex]
9122 <<
" " << XCoord <<
" " << YCoord <<
" " << ZCoord
9123 <<
" " << (Ycoord_Airfoil[iVertex] - Ycoord_LeadingEdge) / Chord <<
" " << (Zcoord_Airfoil[iVertex] - Zcoord_LeadingEdge) / Chord <<
"\n";
9134 ForceInviscid[0] = 0.0; ForceInviscid[1] = 0.0; ForceInviscid[2] = 0.0; MomentInviscid[1] = 0.0;
9136 for (iVertex = 0; iVertex < Xcoord_Airfoil.size() - 1; iVertex++) {
9138 NDPressure = 0.5 * (CPressure_Airfoil[iVertex] + CPressure_Airfoil[iVertex + 1]);
9140 Force[0] = -(Zcoord_Airfoil[iVertex + 1] - Zcoord_Airfoil[iVertex]) * NDPressure;
9142 Force[2] = (Xcoord_Airfoil[iVertex + 1] - Xcoord_Airfoil[iVertex]) * NDPressure;
9144 ForceInviscid[0] += Force[0];
9145 ForceInviscid[1] += Force[1];
9146 ForceInviscid[2] += Force[2];
9148 MomentDist[0] = 0.5 * (Xcoord_Airfoil[iVertex] + Xcoord_Airfoil[iVertex + 1]) - Origin[0];
9149 MomentDist[1] = 0.5 * (Ycoord_Airfoil[iVertex] + Ycoord_Airfoil[iVertex + 1]) - Origin[1];
9150 MomentDist[2] = 0.5 * (Zcoord_Airfoil[iVertex] + Zcoord_Airfoil[iVertex + 1]) - Origin[3];
9152 MomentInviscid[1] += (Force[0] * MomentDist[2] - Force[2] * MomentDist[0]) / RefLength;
9158 MaxDistance = 0.0; Trailing_Point = 0;
9160 for (iVertex = 1; iVertex < Xcoord_Airfoil.size(); iVertex++) {
9162 Distance = sqrt(pow(Xcoord_Airfoil[iVertex] - Xcoord_Airfoil[Trailing_Point], 2.0) +
9163 pow(Ycoord_Airfoil[iVertex] - Ycoord_Airfoil[Trailing_Point], 2.0) +
9164 pow(Zcoord_Airfoil[iVertex] - Zcoord_Airfoil[Trailing_Point], 2.0));
9166 if (MaxDistance < Distance) { MaxDistance = Distance; }
9170 Chord = MaxDistance;
9172 CL_Inv = cos(Dihedral_Trailing *
PI_NUMBER / 180.0) * fabs( -ForceInviscid[0] * sin(Alpha) + ForceInviscid[2] * cos(Alpha) )/ Chord;
9180 Y = Ycoord_Airfoil[0];
9182 Elliptic_Spanload = (C_L0 / RefLength) * sqrt(fabs(1.0-Aux*Aux));
9190 if (iSection == 0) {
9193 Load_File.open(
"load_distribution.csv", ios::out);
9194 Load_File <<
"\"Percent Semispan\",\"Sectional C_L\",\"Spanload (c C_L / c_ref) \",\"Elliptic Spanload\"" << endl;
9197 Load_File.open(
"load_distribution.dat", ios::out);
9198 Load_File <<
"TITLE = \"Load distribution\"" << endl;
9199 Load_File <<
"VARIABLES = \"Percent Semispan\",\"Sectional C<sub>L</sub>\",\"Spanload (c C<sub>L</sub> / c<sub>ref</sub>) \",\"Elliptic Spanload\"" << endl;
9200 Load_File <<
"ZONE T=\"Wing load distribution\"" << endl;
9204 else Load_File.open(
"load_distribution.dat", ios::app);
9211 Load_File << 100.0*Ycoord_Airfoil[0]/(0.5*
B) <<
", " << CL_Inv <<
", " << Chord*CL_Inv / RefLength <<
", " << Elliptic_Spanload << endl;
9213 Load_File << 100.0*Ycoord_Airfoil[0]/(0.5*
B) <<
" " << CL_Inv <<
" " << Chord*CL_Inv / RefLength <<
" " << Elliptic_Spanload << endl;
9229 delete[] Plane_Normal;
9230 delete[] Plane_Normal_;
9238 unsigned short iMarker, icommas, Boundary, iDim;
9239 unsigned long iVertex, iPoint, (*Point2Vertex)[2], nPointLocal = 0, nPointGlobal = 0;
9240 su2double XCoord, YCoord, ZCoord, Pressure, PressureCoeff = 0, Cp, CpTarget, *Normal = NULL, Area, PressDiff;
9241 bool *PointInDomain;
9242 string text_line, surfCp_filename;
9243 ifstream Surface_file;
9244 char buffer[50], cstr[200];
9251 nPointGlobal = nPointLocal;
9254 Point2Vertex =
new unsigned long[nPointGlobal][2];
9255 PointInDomain =
new bool[nPointGlobal];
9257 for (iPoint = 0; iPoint < nPointGlobal; iPoint ++)
9258 PointInDomain[iPoint] =
false;
9260 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
9267 for (iVertex = 0; iVertex < geometry->
GetnVertex(iMarker); iVertex++) {
9278 Point2Vertex[iPoint][0] = iMarker;
9279 Point2Vertex[iPoint][1] = iVertex;
9280 PointInDomain[iPoint] =
true;
9290 surfCp_filename =
"TargetCp";
9291 strcpy (cstr, surfCp_filename.c_str());
9306 strcat (cstr, buffer);
9310 string::size_type position;
9312 Surface_file.open(cstr, ios::in);
9314 if (!(Surface_file.fail())) {
9316 getline(Surface_file, text_line);
9318 while (getline(Surface_file, text_line)) {
9319 for (icommas = 0; icommas < 50; icommas++) {
9320 position = text_line.find(
",", 0 );
9321 if (position!=string::npos) text_line.erase (position,1);
9323 stringstream point_line(text_line);
9325 if (geometry->
GetnDim() == 2) point_line >> iPoint >> XCoord >> YCoord >> Pressure >> PressureCoeff;
9326 if (geometry->
GetnDim() == 3) point_line >> iPoint >> XCoord >> YCoord >> ZCoord >> Pressure >> PressureCoeff;
9328 if (PointInDomain[iPoint]) {
9332 iMarker = Point2Vertex[iPoint][0];
9333 iVertex = Point2Vertex[iPoint][1];
9341 Surface_file.close();
9348 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
9355 for (iVertex = 0; iVertex < geometry->
GetnVertex(iMarker); iVertex++) {
9363 for (iDim = 0; iDim < geometry->
GetnDim(); iDim++)
9364 Area += Normal[iDim]*Normal[iDim];
9367 PressDiff += Area * (CpTarget - Cp) * (CpTarget - Cp);
9374 su2double MyPressDiff = PressDiff; PressDiff = 0.0;
9382 delete [] Point2Vertex;
9383 delete [] PointInDomain;
9389 unsigned short iMarker, icommas, Boundary, iDim;
9390 unsigned long iVertex, iPoint, (*Point2Vertex)[2], nPointLocal = 0, nPointGlobal = 0;
9391 su2double XCoord, YCoord, ZCoord, PressureCoeff, HeatFlux = 0.0, HeatFluxDiff, HeatFluxTarget, *Normal = NULL, Area,
9393 bool *PointInDomain;
9394 string text_line, surfHeatFlux_filename;
9395 ifstream Surface_file;
9396 char buffer[50], cstr[200];
9403 nPointGlobal = nPointLocal;
9406 Point2Vertex =
new unsigned long[nPointGlobal][2];
9407 PointInDomain =
new bool[nPointGlobal];
9409 for (iPoint = 0; iPoint < nPointGlobal; iPoint ++)
9410 PointInDomain[iPoint] =
false;
9412 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
9419 for (iVertex = 0; iVertex < geometry->
GetnVertex(iMarker); iVertex++) {
9430 Point2Vertex[iPoint][0] = iMarker;
9431 Point2Vertex[iPoint][1] = iVertex;
9432 PointInDomain[iPoint] =
true;
9441 surfHeatFlux_filename =
"TargetHeatFlux";
9442 strcpy (cstr, surfHeatFlux_filename.c_str());
9457 strcat (cstr, buffer);
9461 string::size_type position;
9463 Surface_file.open(cstr, ios::in);
9465 if (!(Surface_file.fail())) {
9467 getline(Surface_file, text_line);
9469 while (getline(Surface_file, text_line)) {
9470 for (icommas = 0; icommas < 50; icommas++) {
9471 position = text_line.find(
",", 0 );
9472 if (position!=string::npos) text_line.erase (position,1);
9474 stringstream point_line(text_line);
9476 if (geometry->
GetnDim() == 2) point_line >> iPoint >> XCoord >> YCoord >> Pressure >> PressureCoeff >> Cf >> HeatFlux;
9477 if (geometry->
GetnDim() == 3) point_line >> iPoint >> XCoord >> YCoord >> ZCoord >> Pressure >> PressureCoeff >> Cf >> HeatFlux;
9479 if (PointInDomain[iPoint]) {
9483 iMarker = Point2Vertex[iPoint][0];
9484 iVertex = Point2Vertex[iPoint][1];
9492 Surface_file.close();
9498 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
9505 for (iVertex = 0; iVertex < geometry->
GetnVertex(iMarker); iVertex++) {
9509 HeatFlux = solver_container->
GetHeatFlux(iMarker, iVertex);
9513 for (iDim = 0; iDim < geometry->
GetnDim(); iDim++)
9514 Area += Normal[iDim]*Normal[iDim];
9517 HeatFluxDiff += Area * (HeatFluxTarget - HeatFlux) * (HeatFluxTarget - HeatFlux);
9525 su2double MyHeatFluxDiff = HeatFluxDiff; HeatFluxDiff = 0.0;
9533 delete [] Point2Vertex;
9534 delete [] PointInDomain;
9540 ofstream EquivArea_file, FuncGrad_file;
9541 unsigned short iMarker = 0, iDim;
9542 short *AzimuthalAngle = NULL;
9543 su2double Gamma, auxXCoord, auxYCoord, auxZCoord, InverseDesign = 0.0, DeltaX, Coord_i, Coord_j, jp1Coord, *Coord = NULL, MeanFuntion,
9544 *Face_Normal = NULL, auxArea, auxPress, Mach, Beta, R_Plane, Pressure_Inf,
9545 ModVelocity_Inf, Velocity_Inf[3], factor, *Xcoord = NULL, *Ycoord = NULL, *Zcoord = NULL,
9546 *Pressure = NULL, *FaceArea = NULL, *EquivArea = NULL, *TargetArea = NULL, *NearFieldWeight = NULL,
9547 *Weight = NULL, jFunction, jp1Function;
9548 unsigned long jVertex, iVertex, iPoint, nVertex_NearField = 0, auxPoint,
9549 *IdPoint = NULL, *IdDomain = NULL, auxDomain;
9550 unsigned short iPhiAngle;
9551 ofstream NearFieldEA_file; ifstream TargetEA_file;
9556 unsigned short nDim = geometry->
GetnDim();
9562 Beta = sqrt(Mach*Mach-1.0);
9568 ModVelocity_Inf = 0;
9569 for (iDim = 0; iDim < 3; iDim++)
9570 ModVelocity_Inf += Velocity_Inf[iDim] * Velocity_Inf[iDim];
9572 factor = 4.0*sqrt(2.0*Beta*R_Plane) / (Gamma*Pressure_Inf*Mach*Mach);
9574 if (
rank ==
MASTER_NODE) cout << endl <<
"Writing Equivalent Area files.";
9580 nVertex_NearField = 0;
9583 for (iVertex = 0; iVertex < geometry->
GetnVertex(iMarker); iVertex++) {
9591 if ((Face_Normal[nDim-1] > 0.0) && (Coord[nDim-1] < 0.0)) nVertex_NearField ++;
9597 Xcoord =
new su2double[nVertex_NearField];
9598 Ycoord =
new su2double[nVertex_NearField];
9599 Zcoord =
new su2double[nVertex_NearField];
9600 AzimuthalAngle =
new short[nVertex_NearField];
9601 IdPoint =
new unsigned long[nVertex_NearField];
9602 IdDomain =
new unsigned long[nVertex_NearField];
9603 Pressure =
new su2double[nVertex_NearField];
9604 FaceArea =
new su2double[nVertex_NearField];
9605 EquivArea =
new su2double[nVertex_NearField];
9606 TargetArea =
new su2double[nVertex_NearField];
9607 NearFieldWeight =
new su2double[nVertex_NearField];
9608 Weight =
new su2double[nVertex_NearField];
9612 nVertex_NearField = 0;
9615 for (iVertex = 0; iVertex < geometry->
GetnVertex(iMarker); iVertex++) {
9620 if ((Face_Normal[nDim-1] > 0.0) && (Coord[nDim-1] < 0.0)) {
9622 IdPoint[nVertex_NearField] = iPoint;
9623 Xcoord[nVertex_NearField] = geometry->
node[iPoint]->
GetCoord(0);
9624 Ycoord[nVertex_NearField] = geometry->
node[iPoint]->
GetCoord(1);
9627 AzimuthalAngle[nVertex_NearField] = 0;
9631 Zcoord[nVertex_NearField] = geometry->
node[iPoint]->
GetCoord(2);
9635 su2double YcoordRot = Ycoord[nVertex_NearField];
9636 su2double ZcoordRot = Xcoord[nVertex_NearField]*sin(AoA) + Zcoord[nVertex_NearField]*cos(AoA);
9641 AngleDouble = fabs(atan(-YcoordRot/ZcoordRot)*180.0/
PI_NUMBER);
9647 if ((AngleDouble >= FixAzimuthalLine - 0.1) && (AngleDouble <= FixAzimuthalLine + 0.1)) AngleDouble = FixAzimuthalLine - 0.1;
9650 if (AngleInt >= 0) AzimuthalAngle[nVertex_NearField] = AngleInt;
9651 else AzimuthalAngle[nVertex_NearField] = 180 + AngleInt;
9654 if (AzimuthalAngle[nVertex_NearField] <= 60) {
9656 FaceArea[nVertex_NearField] = fabs(Face_Normal[nDim-1]);
9657 nVertex_NearField ++;
9668 unsigned long nLocalVertex_NearField = 0, MaxLocalVertex_NearField = 0;
9671 unsigned long *Buffer_Receive_nVertex = NULL;
9673 Buffer_Receive_nVertex =
new unsigned long [nProcessor];
9678 nLocalVertex_NearField = 0;
9681 for (iVertex = 0; iVertex < geometry->
GetnVertex(iMarker); iVertex++) {
9687 if ((Face_Normal[nDim-1] > 0.0) && (Coord[nDim-1] < 0.0))
9688 nLocalVertex_NearField ++;
9691 unsigned long *Buffer_Send_nVertex =
new unsigned long [1];
9692 Buffer_Send_nVertex[0] = nLocalVertex_NearField;
9699 delete [] Buffer_Send_nVertex;
9704 unsigned long *Buffer_Send_IdPoint =
new unsigned long [MaxLocalVertex_NearField];
9708 su2double *Buffer_Receive_Xcoord = NULL;
9709 su2double *Buffer_Receive_Ycoord = NULL;
9710 su2double *Buffer_Receive_Zcoord = NULL;
9711 unsigned long *Buffer_Receive_IdPoint = NULL;
9712 su2double *Buffer_Receive_Pressure = NULL;
9713 su2double *Buffer_Receive_FaceArea = NULL;
9716 Buffer_Receive_Xcoord =
new su2double[nProcessor*MaxLocalVertex_NearField];
9717 Buffer_Receive_Ycoord =
new su2double[nProcessor*MaxLocalVertex_NearField];
9718 Buffer_Receive_Zcoord =
new su2double[nProcessor*MaxLocalVertex_NearField];
9719 Buffer_Receive_IdPoint =
new unsigned long[nProcessor*MaxLocalVertex_NearField];
9720 Buffer_Receive_Pressure =
new su2double[nProcessor*MaxLocalVertex_NearField];
9721 Buffer_Receive_FaceArea =
new su2double[nProcessor*MaxLocalVertex_NearField];
9724 unsigned long nBuffer_Xcoord = MaxLocalVertex_NearField;
9725 unsigned long nBuffer_Ycoord = MaxLocalVertex_NearField;
9726 unsigned long nBuffer_Zcoord = MaxLocalVertex_NearField;
9727 unsigned long nBuffer_IdPoint = MaxLocalVertex_NearField;
9728 unsigned long nBuffer_Pressure = MaxLocalVertex_NearField;
9729 unsigned long nBuffer_FaceArea = MaxLocalVertex_NearField;
9731 for (iVertex = 0; iVertex < MaxLocalVertex_NearField; iVertex++) {
9732 Buffer_Send_IdPoint[iVertex] = 0; Buffer_Send_Pressure[iVertex] = 0.0;
9733 Buffer_Send_FaceArea[iVertex] = 0.0; Buffer_Send_Xcoord[iVertex] = 0.0;
9734 Buffer_Send_Ycoord[iVertex] = 0.0; Buffer_Send_Zcoord[iVertex] = 0.0;
9739 nLocalVertex_NearField = 0;
9742 for (iVertex = 0; iVertex < geometry->
GetnVertex(iMarker); iVertex++) {
9748 if ((Face_Normal[nDim-1] > 0.0) && (Coord[nDim-1] < 0.0)) {
9749 Buffer_Send_IdPoint[nLocalVertex_NearField] = iPoint;
9750 Buffer_Send_Xcoord[nLocalVertex_NearField] = geometry->
node[iPoint]->
GetCoord(0);
9751 Buffer_Send_Ycoord[nLocalVertex_NearField] = geometry->
node[iPoint]->
GetCoord(1);
9752 Buffer_Send_Zcoord[nLocalVertex_NearField] = geometry->
node[iPoint]->
GetCoord(2);
9753 Buffer_Send_Pressure[nLocalVertex_NearField] = solver->
node[iPoint]->
GetPressure();
9754 Buffer_Send_FaceArea[nLocalVertex_NearField] = fabs(Face_Normal[nDim-1]);
9755 nLocalVertex_NearField++;
9767 delete [] Buffer_Send_Xcoord;
9768 delete [] Buffer_Send_Ycoord;
9769 delete [] Buffer_Send_Zcoord;
9770 delete [] Buffer_Send_IdPoint;
9771 delete [] Buffer_Send_Pressure;
9772 delete [] Buffer_Send_FaceArea;
9776 Xcoord =
new su2double[nVertex_NearField];
9777 Ycoord =
new su2double[nVertex_NearField];
9778 Zcoord =
new su2double[nVertex_NearField];
9779 AzimuthalAngle =
new short[nVertex_NearField];
9780 IdPoint =
new unsigned long[nVertex_NearField];
9781 IdDomain =
new unsigned long[nVertex_NearField];
9782 Pressure =
new su2double[nVertex_NearField];
9783 FaceArea =
new su2double[nVertex_NearField];
9784 EquivArea =
new su2double[nVertex_NearField];
9785 TargetArea =
new su2double[nVertex_NearField];
9786 NearFieldWeight =
new su2double[nVertex_NearField];
9787 Weight =
new su2double[nVertex_NearField];
9789 nVertex_NearField = 0;
9790 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++)
9791 for (iVertex = 0; iVertex < Buffer_Receive_nVertex[iProcessor]; iVertex++) {
9792 Xcoord[nVertex_NearField] = Buffer_Receive_Xcoord[iProcessor*MaxLocalVertex_NearField+iVertex];
9793 Ycoord[nVertex_NearField] = Buffer_Receive_Ycoord[iProcessor*MaxLocalVertex_NearField+iVertex];
9796 AzimuthalAngle[nVertex_NearField] = 0;
9800 Zcoord[nVertex_NearField] = Buffer_Receive_Zcoord[iProcessor*MaxLocalVertex_NearField+iVertex];
9804 su2double YcoordRot = Ycoord[nVertex_NearField];
9805 su2double ZcoordRot = Xcoord[nVertex_NearField]*sin(AoA) + Zcoord[nVertex_NearField]*cos(AoA);
9810 AngleDouble = fabs(atan(-YcoordRot/ZcoordRot)*180.0/
PI_NUMBER);
9816 if ((AngleDouble >= FixAzimuthalLine - 0.1) && (AngleDouble <= FixAzimuthalLine + 0.1))
9817 AngleDouble = FixAzimuthalLine - 0.1;
9821 if (AngleInt >= 0) AzimuthalAngle[nVertex_NearField] = AngleInt;
9822 else AzimuthalAngle[nVertex_NearField] = 180 + AngleInt;
9825 if (AzimuthalAngle[nVertex_NearField] <= 60) {
9826 IdPoint[nVertex_NearField] = Buffer_Receive_IdPoint[iProcessor*MaxLocalVertex_NearField+iVertex];
9827 Pressure[nVertex_NearField] = Buffer_Receive_Pressure[iProcessor*MaxLocalVertex_NearField+iVertex];
9828 FaceArea[nVertex_NearField] = Buffer_Receive_FaceArea[iProcessor*MaxLocalVertex_NearField+iVertex];
9829 IdDomain[nVertex_NearField] = iProcessor;
9830 nVertex_NearField++;
9835 delete [] Buffer_Receive_nVertex;
9837 delete [] Buffer_Receive_Xcoord;
9838 delete [] Buffer_Receive_Ycoord;
9839 delete [] Buffer_Receive_Zcoord;
9840 delete [] Buffer_Receive_IdPoint;
9841 delete [] Buffer_Receive_Pressure;
9842 delete [] Buffer_Receive_FaceArea;
9850 vector<short> PhiAngleList;
9851 vector<short>::iterator IterPhiAngleList;
9853 for (iVertex = 0; iVertex < nVertex_NearField; iVertex++)
9854 PhiAngleList.push_back(AzimuthalAngle[iVertex]);
9856 sort( PhiAngleList.begin(), PhiAngleList.end());
9857 IterPhiAngleList = unique( PhiAngleList.begin(), PhiAngleList.end());
9858 PhiAngleList.resize( IterPhiAngleList - PhiAngleList.begin() );
9862 vector<vector<su2double> > Xcoord_PhiAngle; Xcoord_PhiAngle.resize(PhiAngleList.size());
9863 vector<vector<su2double> > Ycoord_PhiAngle; Ycoord_PhiAngle.resize(PhiAngleList.size());
9864 vector<vector<su2double> > Zcoord_PhiAngle; Zcoord_PhiAngle.resize(PhiAngleList.size());
9865 vector<vector<unsigned long> > IdPoint_PhiAngle; IdPoint_PhiAngle.resize(PhiAngleList.size());
9866 vector<vector<unsigned long> > IdDomain_PhiAngle; IdDomain_PhiAngle.resize(PhiAngleList.size());
9867 vector<vector<su2double> > Pressure_PhiAngle; Pressure_PhiAngle.resize(PhiAngleList.size());
9868 vector<vector<su2double> > FaceArea_PhiAngle; FaceArea_PhiAngle.resize(PhiAngleList.size());
9869 vector<vector<su2double> > EquivArea_PhiAngle; EquivArea_PhiAngle.resize(PhiAngleList.size());
9870 vector<vector<su2double> > TargetArea_PhiAngle; TargetArea_PhiAngle.resize(PhiAngleList.size());
9871 vector<vector<su2double> > NearFieldWeight_PhiAngle; NearFieldWeight_PhiAngle.resize(PhiAngleList.size());
9872 vector<vector<su2double> > Weight_PhiAngle; Weight_PhiAngle.resize(PhiAngleList.size());
9876 for (iVertex = 0; iVertex < nVertex_NearField; iVertex++)
9877 for (iPhiAngle = 0; iPhiAngle < PhiAngleList.size(); iPhiAngle++)
9878 if (AzimuthalAngle[iVertex] == PhiAngleList[iPhiAngle]) {
9879 Xcoord_PhiAngle[iPhiAngle].push_back(Xcoord[iVertex]);
9880 Ycoord_PhiAngle[iPhiAngle].push_back(Ycoord[iVertex]);
9881 Zcoord_PhiAngle[iPhiAngle].push_back(Zcoord[iVertex]);
9882 IdPoint_PhiAngle[iPhiAngle].push_back(IdPoint[iVertex]);
9883 IdDomain_PhiAngle[iPhiAngle].push_back(IdDomain[iVertex]);
9884 Pressure_PhiAngle[iPhiAngle].push_back(Pressure[iVertex]);
9885 FaceArea_PhiAngle[iPhiAngle].push_back(FaceArea[iVertex]);
9886 EquivArea_PhiAngle[iPhiAngle].push_back(EquivArea[iVertex]);
9887 TargetArea_PhiAngle[iPhiAngle].push_back(TargetArea[iVertex]);
9888 NearFieldWeight_PhiAngle[iPhiAngle].push_back(NearFieldWeight[iVertex]);
9889 Weight_PhiAngle[iPhiAngle].push_back(Weight[iVertex]);
9894 for (iPhiAngle = 0; iPhiAngle < PhiAngleList.size(); iPhiAngle++)
9895 for (iVertex = 0; iVertex < Xcoord_PhiAngle[iPhiAngle].size(); iVertex++)
9896 for (jVertex = 0; jVertex < Xcoord_PhiAngle[iPhiAngle].size() - 1 - iVertex; jVertex++)
9897 if (Xcoord_PhiAngle[iPhiAngle][jVertex] > Xcoord_PhiAngle[iPhiAngle][jVertex+1]) {
9898 auxXCoord = Xcoord_PhiAngle[iPhiAngle][jVertex]; Xcoord_PhiAngle[iPhiAngle][jVertex] = Xcoord_PhiAngle[iPhiAngle][jVertex+1]; Xcoord_PhiAngle[iPhiAngle][jVertex+1] = auxXCoord;
9899 auxYCoord = Ycoord_PhiAngle[iPhiAngle][jVertex]; Ycoord_PhiAngle[iPhiAngle][jVertex] = Ycoord_PhiAngle[iPhiAngle][jVertex+1]; Ycoord_PhiAngle[iPhiAngle][jVertex+1] = auxYCoord;
9900 auxZCoord = Zcoord_PhiAngle[iPhiAngle][jVertex]; Zcoord_PhiAngle[iPhiAngle][jVertex] = Zcoord_PhiAngle[iPhiAngle][jVertex+1]; Zcoord_PhiAngle[iPhiAngle][jVertex+1] = auxZCoord;
9901 auxPress = Pressure_PhiAngle[iPhiAngle][jVertex]; Pressure_PhiAngle[iPhiAngle][jVertex] = Pressure_PhiAngle[iPhiAngle][jVertex+1]; Pressure_PhiAngle[iPhiAngle][jVertex+1] = auxPress;
9902 auxArea = FaceArea_PhiAngle[iPhiAngle][jVertex]; FaceArea_PhiAngle[iPhiAngle][jVertex] = FaceArea_PhiAngle[iPhiAngle][jVertex+1]; FaceArea_PhiAngle[iPhiAngle][jVertex+1] = auxArea;
9903 auxPoint = IdPoint_PhiAngle[iPhiAngle][jVertex]; IdPoint_PhiAngle[iPhiAngle][jVertex] = IdPoint_PhiAngle[iPhiAngle][jVertex+1]; IdPoint_PhiAngle[iPhiAngle][jVertex+1] = auxPoint;
9904 auxDomain = IdDomain_PhiAngle[iPhiAngle][jVertex]; IdDomain_PhiAngle[iPhiAngle][jVertex] = IdDomain_PhiAngle[iPhiAngle][jVertex+1]; IdDomain_PhiAngle[iPhiAngle][jVertex+1] = auxDomain;
9910 unsigned short nVertex = Xcoord_PhiAngle[0].size();
9911 for (iPhiAngle = 0; iPhiAngle < PhiAngleList.size(); iPhiAngle++) {
9912 unsigned short nVertex_aux = Xcoord_PhiAngle[iPhiAngle].size();
9913 if (nVertex_aux != nVertex) cout <<
"Be careful!!! one azimuth list is shorter than the other"<< endl;
9914 nVertex = min(nVertex, nVertex_aux);
9919 for (iPhiAngle = 0; iPhiAngle < PhiAngleList.size(); iPhiAngle++) {
9920 EquivArea_PhiAngle[iPhiAngle][0] = 0.0;
9921 for (iVertex = 1; iVertex < EquivArea_PhiAngle[iPhiAngle].size(); iVertex++) {
9922 EquivArea_PhiAngle[iPhiAngle][iVertex] = 0.0;
9924 Coord_i = Xcoord_PhiAngle[iPhiAngle][iVertex]*cos(AoA) - Zcoord_PhiAngle[iPhiAngle][iVertex]*sin(AoA);
9926 for (jVertex = 0; jVertex < iVertex-1; jVertex++) {
9928 Coord_j = Xcoord_PhiAngle[iPhiAngle][jVertex]*cos(AoA) - Zcoord_PhiAngle[iPhiAngle][jVertex]*sin(AoA);
9929 jp1Coord = Xcoord_PhiAngle[iPhiAngle][jVertex+1]*cos(AoA) - Zcoord_PhiAngle[iPhiAngle][jVertex+1]*sin(AoA);
9931 jFunction = factor*(Pressure_PhiAngle[iPhiAngle][jVertex] - Pressure_Inf)*sqrt(Coord_i-Coord_j);
9932 jp1Function = factor*(Pressure_PhiAngle[iPhiAngle][jVertex+1] - Pressure_Inf)*sqrt(Coord_i-jp1Coord);
9934 DeltaX = (jp1Coord-Coord_j);
9935 MeanFuntion = 0.5*(jp1Function + jFunction);
9936 EquivArea_PhiAngle[iPhiAngle][iVertex] += DeltaX * MeanFuntion;
9943 NearFieldEA_file.precision(15);
9947 NearFieldEA_file.open(
"Equivalent_Area.dat", ios::out);
9948 NearFieldEA_file <<
"TITLE = \"Equivalent Area evaluation at each azimuthal angle\"" <<
"\n";
9951 NearFieldEA_file <<
"VARIABLES = \"Height (in) at r="<< R_Plane*12.0 <<
" in. (cyl. coord. system)\"";
9953 NearFieldEA_file <<
"VARIABLES = \"Height (m) at r="<< R_Plane <<
" m. (cylindrical coordinate system)\"";
9955 for (iPhiAngle = 0; iPhiAngle < PhiAngleList.size(); iPhiAngle++) {
9957 NearFieldEA_file <<
", \"Equivalent Area (ft<sup>2</sup>), <greek>F</greek>= " << PhiAngleList[iPhiAngle] <<
" deg.\"";
9959 NearFieldEA_file <<
", \"Equivalent Area (m<sup>2</sup>), <greek>F</greek>= " << PhiAngleList[iPhiAngle] <<
" deg.\"";
9962 NearFieldEA_file <<
"\n";
9963 for (iVertex = 0; iVertex < EquivArea_PhiAngle[0].size(); iVertex++) {
9965 su2double XcoordRot = Xcoord_PhiAngle[0][iVertex]*cos(AoA) - Zcoord_PhiAngle[0][iVertex]*sin(AoA);
9966 su2double XcoordRot_init = Xcoord_PhiAngle[0][0]*cos(AoA) - Zcoord_PhiAngle[0][0]*sin(AoA);
9969 NearFieldEA_file << scientific << (XcoordRot - XcoordRot_init) * 12.0;
9971 NearFieldEA_file << scientific << (XcoordRot - XcoordRot_init);
9973 for (iPhiAngle = 0; iPhiAngle < PhiAngleList.size(); iPhiAngle++) {
9974 NearFieldEA_file << scientific <<
", " << EquivArea_PhiAngle[iPhiAngle][iVertex];
9977 NearFieldEA_file <<
"\n";
9980 NearFieldEA_file.close();
9988 vector<vector<su2double> > TargetArea_PhiAngle_Trans;
9989 TargetEA_file.open(
"TargetEA.dat", ios::in);
9991 if (TargetEA_file.fail()) {
9993 for (iPhiAngle = 0; iPhiAngle < PhiAngleList.size(); iPhiAngle++)
9994 for (iVertex = 0; iVertex < TargetArea_PhiAngle[iPhiAngle].size(); iVertex++)
9995 TargetArea_PhiAngle[iPhiAngle][iVertex] = 0.0;
10002 getline(TargetEA_file, line);
10003 getline(TargetEA_file, line);
10005 while (TargetEA_file) {
10008 getline(TargetEA_file, line);
10009 istringstream is(line);
10010 vector<su2double> row;
10011 unsigned short iter = 0;
10013 while (is.good()) {
10015 getline(is, token,
',');
10017 istringstream js(token);
10024 if (iter != 0) row.push_back(data);
10028 TargetArea_PhiAngle_Trans.push_back(row);
10031 for (iPhiAngle = 0; iPhiAngle < PhiAngleList.size(); iPhiAngle++)
10032 for (iVertex = 0; iVertex < EquivArea_PhiAngle[iPhiAngle].size(); iVertex++)
10033 TargetArea_PhiAngle[iPhiAngle][iVertex] = TargetArea_PhiAngle_Trans[iVertex][iPhiAngle];
10044 for (iPhiAngle = 0; iPhiAngle < PhiAngleList.size(); iPhiAngle++)
10045 for (iVertex = 0; iVertex < EquivArea_PhiAngle[iPhiAngle].size(); iVertex++) {
10046 Weight_PhiAngle[iPhiAngle][iVertex] = 1.0;
10047 Coord_i = Xcoord_PhiAngle[iPhiAngle][iVertex];
10049 su2double Difference = EquivArea_PhiAngle[iPhiAngle][iVertex]-TargetArea_PhiAngle[iPhiAngle][iVertex];
10050 su2double percentage = fabs(Difference)*100/fabs(TargetArea_PhiAngle[iPhiAngle][iVertex]);
10052 if ((percentage < 0.1) || (Coord_i < XCoordBegin_OF) || (Coord_i > XCoordEnd_OF)) Difference = 0.0;
10054 InverseDesign += EAScaleFactor*PhiFactor*Weight_PhiAngle[iPhiAngle][iVertex]*Difference*Difference;
10060 for (iPhiAngle = 0; iPhiAngle < PhiAngleList.size(); iPhiAngle++)
10061 for (iVertex = 0; iVertex < EquivArea_PhiAngle[iPhiAngle].size(); iVertex++) {
10062 Coord_i = Xcoord_PhiAngle[iPhiAngle][iVertex];
10063 NearFieldWeight_PhiAngle[iPhiAngle][iVertex] = 0.0;
10064 for (jVertex = iVertex; jVertex < EquivArea_PhiAngle[iPhiAngle].size(); jVertex++) {
10065 Coord_j = Xcoord_PhiAngle[iPhiAngle][jVertex];
10066 Weight_PhiAngle[iPhiAngle][iVertex] = 1.0;
10068 su2double Difference = EquivArea_PhiAngle[iPhiAngle][jVertex]-TargetArea_PhiAngle[iPhiAngle][jVertex];
10069 su2double percentage = fabs(Difference)*100/fabs(TargetArea_PhiAngle[iPhiAngle][jVertex]);
10071 if ((percentage < 0.1) || (Coord_j < XCoordBegin_OF) || (Coord_j > XCoordEnd_OF)) Difference = 0.0;
10073 NearFieldWeight_PhiAngle[iPhiAngle][iVertex] += EAScaleFactor*PhiFactor*Weight_PhiAngle[iPhiAngle][iVertex]*2.0*Difference*factor*sqrt(Coord_j-Coord_i);
10079 EquivArea_file.precision(15);
10083 EquivArea_file.open(
"nearfield_flow.dat", ios::out);
10084 EquivArea_file <<
"TITLE = \"Equivalent Area evaluation at each azimuthal angle\"" <<
"\n";
10087 EquivArea_file <<
"VARIABLES = \"Height (in) at r="<< R_Plane*12.0 <<
" in. (cyl. coord. system)\",\"Equivalent Area (ft<sup>2</sup>)\",\"Target Equivalent Area (ft<sup>2</sup>)\",\"Cp\"" <<
"\n";
10089 EquivArea_file <<
"VARIABLES = \"Height (m) at r="<< R_Plane <<
" m. (cylindrical coordinate system)\",\"Equivalent Area (m<sup>2</sup>)\",\"Target Equivalent Area (m<sup>2</sup>)\",\"Cp\"" <<
"\n";
10091 for (iPhiAngle = 0; iPhiAngle < PhiAngleList.size(); iPhiAngle++) {
10092 EquivArea_file << fixed <<
"ZONE T= \"<greek>F</greek>=" << PhiAngleList[iPhiAngle] <<
" deg.\"" <<
"\n";
10093 for (iVertex = 0; iVertex < Xcoord_PhiAngle[iPhiAngle].size(); iVertex++) {
10095 su2double XcoordRot = Xcoord_PhiAngle[0][iVertex]*cos(AoA) - Zcoord_PhiAngle[0][iVertex]*sin(AoA);
10096 su2double XcoordRot_init = Xcoord_PhiAngle[0][0]*cos(AoA) - Zcoord_PhiAngle[0][0]*sin(AoA);
10099 EquivArea_file << scientific << (XcoordRot - XcoordRot_init) * 12.0;
10101 EquivArea_file << scientific << (XcoordRot - XcoordRot_init);
10103 EquivArea_file << scientific <<
", " << EquivArea_PhiAngle[iPhiAngle][iVertex]
10104 <<
", " << TargetArea_PhiAngle[iPhiAngle][iVertex] <<
", " << (Pressure_PhiAngle[iPhiAngle][iVertex]-Pressure_Inf)/Pressure_Inf <<
"\n";
10108 EquivArea_file.close();
10114 FuncGrad_file.precision(15);
10118 FuncGrad_file.open(
"WeightNF.dat", ios::out);
10120 FuncGrad_file << scientific <<
"-1.0";
10121 for (iPhiAngle = 0; iPhiAngle < PhiAngleList.size(); iPhiAngle++)
10122 FuncGrad_file << scientific <<
"\t" << PhiAngleList[iPhiAngle];
10123 FuncGrad_file <<
"\n";
10125 for (iVertex = 0; iVertex < NearFieldWeight_PhiAngle[0].size(); iVertex++) {
10126 su2double XcoordRot = Xcoord_PhiAngle[0][iVertex]*cos(AoA) - Zcoord_PhiAngle[0][iVertex]*sin(AoA);
10127 FuncGrad_file << scientific << XcoordRot;
10128 for (iPhiAngle = 0; iPhiAngle < PhiAngleList.size(); iPhiAngle++)
10129 FuncGrad_file << scientific <<
"\t" << NearFieldWeight_PhiAngle[iPhiAngle][iVertex];
10130 FuncGrad_file <<
"\n";
10132 FuncGrad_file.close();
10138 delete [] Xcoord;
delete [] Ycoord;
delete [] Zcoord;
10139 delete [] AzimuthalAngle;
delete [] IdPoint;
delete [] IdDomain;
10140 delete [] Pressure;
delete [] FaceArea;
10141 delete [] EquivArea;
delete [] TargetArea;
10142 delete [] NearFieldWeight;
delete [] Weight;
10168 unsigned short iMarker, iDim, iMarker_Analyze;
10169 unsigned long iPoint, iVertex;
10170 su2double xCoord = 0.0, yCoord = 0.0, zCoord = 0.0, Area = 0.0, *Vector, TotalArea = 0.0;
10171 su2double xCoord_CG = 0.0, yCoord_CG = 0.0, zCoord_CG = 0.0, TipRadius, HubRadius, Distance = 0.0, Distance_Mirror = 0.0;
10172 su2double *r, MinDistance, xCoord_ = 0.0, yCoord_ = 0.0, zCoord_ = 0;
10173 unsigned short iStation, iAngle, nAngle;
10175 su2double *** ProbeArray, dx = 0.0, dy = 0.0, dz = 0.0, dx_ = 0.0, dy_ = 0.0, dz_ = 0.0, UpVector[3], radians, RotatedVector[3];
10176 su2double Pressure, SoundSpeed, Velocity2, Mach, Gamma, TotalPressure, Mach_Inf, TotalPressure_Inf,
10177 Temperature, TotalTemperature, Pressure_Inf, Temperature_Inf, TotalTemperature_Inf, Velocity_Inf, Density;
10178 unsigned short nDim = geometry->
GetnDim();
10179 unsigned short Theta, nStation;
10180 unsigned long nVertex_Surface, nLocalVertex_Surface, MaxLocalVertex_Surface;
10181 unsigned long Buffer_Send_nVertex[1], *Buffer_Recv_nVertex = NULL;
10182 unsigned long Total_Index;
10183 unsigned short Theta_DC60 = 60, nStation_DC60 = 5;
10184 su2double PT_Mean, Mach_Mean, q_Mean, PT, q, *PT_Sector, PT_Sector_Min, DC60, *PT_Station, *PT_Station_Min, *Mach_Station, *Mach_Station_Min, IDR, IDC, IDC_Mach;
10190 su2double Mach_ij, Mach_ip1j, Mach_im1j, Mach_ijp1, Mach_ijm1, Filtered_Mach;
10191 su2double Alpha_ij, Alpha_ip1j, Alpha_im1j, Alpha_ijp1, Alpha_ijm1, Filtered_Alpha;
10192 su2double Beta_ij, Beta_ip1j, Beta_im1j, Beta_ijp1, Beta_ijm1, Filtered_Beta;
10195 int iProcessor, nProcessor;
10203 ofstream SurfFlow_file;
10208 else strcpy (cstr,
"surface_analysis.dat");
10210 SurfFlow_file.precision(15);
10212 SurfFlow_file.open(cstr, ios::out);
10215 SurfFlow_file <<
"# vtk DataFile Version 3.0" << endl;
10216 SurfFlow_file <<
"vtk output" << endl;
10217 SurfFlow_file <<
"ASCII" << endl;
10220 SurfFlow_file <<
"TITLE = \"Surface Analysis\"" <<endl;
10221 SurfFlow_file <<
"VARIABLES = \"y(in)\", \"z(in)\", \"PT/PT<sub>inf</sub>\", \"TT/TT<sub>inf</sub>\", \"P/P<sub>inf</sub>\", \"T/T<sub>inf</sub>\", \"v<sub>x</sub>/v<sub>inf</sub>\", \"v<sub>y</sub>/v<sub>inf</sub>\", \"v<sub>z</sub>/v<sub>inf</sub>\", \"<greek>a</greek> (deg)\", \"<greek>b</greek> (deg)\", \"Mach\", \"Filtered <greek>a</greek> (deg)\", \"Filtered <greek>b</greek> (deg)\", \"Filtered Mach\"" << endl;
10228 for (iMarker_Analyze = 0; iMarker_Analyze < config->
GetnMarker_Analyze(); iMarker_Analyze++) {
10232 nVertex_Surface = 0; nLocalVertex_Surface = 0; MaxLocalVertex_Surface = 0;
10238 nLocalVertex_Surface = 0;
10239 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
10241 if (Marker_TagBound == Analyze_TagBound) {
10242 for (iVertex = 0; iVertex < geometry->
GetnVertex(iMarker); iVertex++) {
10244 if (geometry->
node[iPoint]->
GetDomain()) nLocalVertex_Surface++;
10252 Buffer_Send_nVertex[0] = nLocalVertex_Surface;
10253 if (
rank ==
MASTER_NODE) Buffer_Recv_nVertex =
new unsigned long [nProcessor];
10259 MaxLocalVertex_Surface = nLocalVertex_Surface;
10265 su2double *Buffer_Send_Coord_x = NULL, *Buffer_Recv_Coord_x = NULL;
10266 Buffer_Send_Coord_x =
new su2double [MaxLocalVertex_Surface];
10268 su2double *Buffer_Send_Coord_y = NULL, *Buffer_Recv_Coord_y = NULL;
10269 Buffer_Send_Coord_y =
new su2double [MaxLocalVertex_Surface];
10271 su2double *Buffer_Send_Coord_z = NULL, *Buffer_Recv_Coord_z = NULL;
10272 if (nDim == 3) Buffer_Send_Coord_z =
new su2double [MaxLocalVertex_Surface];
10274 su2double *Buffer_Send_PT = NULL, *Buffer_Recv_PT = NULL;
10275 Buffer_Send_PT =
new su2double [MaxLocalVertex_Surface];
10277 su2double *Buffer_Send_TT = NULL, *Buffer_Recv_TT = NULL;
10278 Buffer_Send_TT =
new su2double [MaxLocalVertex_Surface];
10280 su2double *Buffer_Send_P = NULL, *Buffer_Recv_P = NULL;
10281 Buffer_Send_P =
new su2double [MaxLocalVertex_Surface];
10283 su2double *Buffer_Send_T = NULL, *Buffer_Recv_T = NULL;
10284 Buffer_Send_T =
new su2double [MaxLocalVertex_Surface];
10286 su2double *Buffer_Send_Mach = NULL, *Buffer_Recv_Mach = NULL;
10287 Buffer_Send_Mach =
new su2double [MaxLocalVertex_Surface];
10289 su2double *Buffer_Send_Vel_x = NULL, *Buffer_Recv_Vel_x = NULL;
10290 Buffer_Send_Vel_x =
new su2double [MaxLocalVertex_Surface];
10292 su2double *Buffer_Send_Vel_y = NULL, *Buffer_Recv_Vel_y = NULL;
10293 Buffer_Send_Vel_y =
new su2double [MaxLocalVertex_Surface];
10295 su2double *Buffer_Send_Vel_z = NULL, *Buffer_Recv_Vel_z = NULL;
10296 if (nDim == 3) Buffer_Send_Vel_z =
new su2double [MaxLocalVertex_Surface];
10298 su2double *Buffer_Send_q = NULL, *Buffer_Recv_q = NULL;
10299 Buffer_Send_q =
new su2double [MaxLocalVertex_Surface];
10301 su2double *Buffer_Send_Area = NULL, *Buffer_Recv_Area = NULL;
10302 Buffer_Send_Area =
new su2double [MaxLocalVertex_Surface];
10307 Buffer_Recv_Coord_x =
new su2double [nProcessor*MaxLocalVertex_Surface];
10308 Buffer_Recv_Coord_y =
new su2double [nProcessor*MaxLocalVertex_Surface];
10309 if (nDim == 3) Buffer_Recv_Coord_z =
new su2double [nProcessor*MaxLocalVertex_Surface];
10310 Buffer_Recv_PT =
new su2double [nProcessor*MaxLocalVertex_Surface];
10311 Buffer_Recv_TT =
new su2double [nProcessor*MaxLocalVertex_Surface];
10312 Buffer_Recv_P =
new su2double [nProcessor*MaxLocalVertex_Surface];
10313 Buffer_Recv_T =
new su2double [nProcessor*MaxLocalVertex_Surface];
10314 Buffer_Recv_Mach =
new su2double [nProcessor*MaxLocalVertex_Surface];
10315 Buffer_Recv_Vel_x =
new su2double [nProcessor*MaxLocalVertex_Surface];
10316 Buffer_Recv_Vel_y =
new su2double [nProcessor*MaxLocalVertex_Surface];
10318 Buffer_Recv_Vel_z =
new su2double [nProcessor*MaxLocalVertex_Surface];
10320 Buffer_Recv_q =
new su2double [nProcessor*MaxLocalVertex_Surface];
10321 Buffer_Recv_Area =
new su2double [nProcessor*MaxLocalVertex_Surface];
10328 nVertex_Surface = 0;
10329 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
10331 if (Marker_TagBound == Analyze_TagBound) {
10333 for (iVertex = 0; iVertex < geometry->
GetnVertex(iMarker); iVertex++) {
10338 Buffer_Send_Coord_x[nVertex_Surface] = geometry->
node[iPoint]->
GetCoord(0);
10339 Buffer_Send_Coord_y[nVertex_Surface] = geometry->
node[iPoint]->
GetCoord(1);
10340 if (nDim == 3) { Buffer_Send_Coord_z[nVertex_Surface] = geometry->
node[iPoint]->
GetCoord(2); }
10347 Mach = sqrt(Velocity2)/SoundSpeed;
10350 Mach_Inf = config->
GetMach();
10357 Buffer_Send_P[nVertex_Surface] = Pressure / Pressure_Inf;
10358 Buffer_Send_T[nVertex_Surface] = Temperature / Temperature_Inf;
10359 Buffer_Send_Mach[nVertex_Surface] = Mach;
10361 TotalPressure = Pressure * pow( 1.0 + Mach * Mach * 0.5 * (Gamma - 1.0), Gamma / (Gamma - 1.0));
10362 TotalPressure_Inf = Pressure_Inf * pow( 1.0 + Mach_Inf * Mach_Inf * 0.5 * (Gamma - 1.0), Gamma / (Gamma - 1.0));
10363 Buffer_Send_PT[nVertex_Surface] = TotalPressure / TotalPressure_Inf;
10365 TotalTemperature = Temperature * (1.0 + Mach * Mach * 0.5 * (Gamma - 1.0));
10366 TotalTemperature_Inf = Temperature_Inf * (1.0 + Mach * Mach * 0.5 * (Gamma - 1.0));
10367 Buffer_Send_TT[nVertex_Surface] = TotalTemperature / TotalTemperature_Inf;
10369 Buffer_Send_Vel_x[nVertex_Surface] = solver->
node[iPoint]->
GetVelocity(0) / Velocity_Inf;
10370 Buffer_Send_Vel_y[nVertex_Surface] = solver->
node[iPoint]->
GetVelocity(1) / Velocity_Inf;
10372 Buffer_Send_Vel_z[nVertex_Surface] = solver->
node[iPoint]->
GetVelocity(2) / Velocity_Inf;
10375 Buffer_Send_q[nVertex_Surface] = 0.5*Density*Velocity2;
10378 Area = 0.0;
for (iDim = 0; iDim < nDim; iDim++) { Area += Vector[iDim]*Vector[iDim]; } Area = sqrt(Area);
10379 Buffer_Send_Area[nVertex_Surface] = Area;
10385 Buffer_Send_Coord_x[nVertex_Surface] *= 12.0;
10386 Buffer_Send_Coord_y[nVertex_Surface] *= 12.0;
10387 if (nDim == 3) Buffer_Send_Coord_z[nVertex_Surface] *= 12.0;
10388 Buffer_Send_Area[nVertex_Surface] *= 144.0;
10420 for (iVertex = 0; iVertex < MaxLocalVertex_Surface; iVertex++) {
10421 Buffer_Recv_Coord_x[iVertex] = Buffer_Send_Coord_x[iVertex];
10422 Buffer_Recv_Coord_y[iVertex] = Buffer_Send_Coord_y[iVertex];
10423 if (nDim == 3) Buffer_Recv_Coord_z[iVertex] = Buffer_Send_Coord_z[iVertex];
10424 Buffer_Recv_PT[iVertex] = Buffer_Send_PT[iVertex];
10425 Buffer_Recv_TT[iVertex] = Buffer_Send_TT[iVertex];
10426 Buffer_Recv_P[iVertex] = Buffer_Send_P[iVertex];
10427 Buffer_Recv_T[iVertex] = Buffer_Send_T[iVertex];
10428 Buffer_Recv_Mach[iVertex] = Buffer_Send_Mach[iVertex];
10429 Buffer_Recv_Vel_x[iVertex] = Buffer_Send_Vel_x[iVertex];
10430 Buffer_Recv_Vel_y[iVertex] = Buffer_Send_Vel_y[iVertex];
10431 if (nDim == 3) Buffer_Recv_Vel_z[iVertex] = Buffer_Send_Vel_z[iVertex];
10432 Buffer_Recv_q[iVertex] = Buffer_Send_q[iVertex];
10433 Buffer_Recv_Area[iVertex] = Buffer_Send_Area[iVertex];
10442 TotalArea = 0.0; xCoord_CG = 0.0; yCoord_CG = 0.0; zCoord_CG = 0.0; PT_Mean = 0.0; Mach_Mean = 0.0; q_Mean = 0.0;
10444 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
10445 for (iVertex = 0; iVertex < Buffer_Recv_nVertex[iProcessor]; iVertex++) {
10449 Total_Index = iProcessor*MaxLocalVertex_Surface+iVertex;
10453 xCoord = Buffer_Recv_Coord_x[Total_Index];
10454 yCoord = Buffer_Recv_Coord_y[Total_Index];
10455 if (nDim == 3) zCoord = Buffer_Recv_Coord_z[Total_Index];
10456 PT = Buffer_Recv_PT[Total_Index];
10457 Mach = Buffer_Recv_Mach[Total_Index];
10458 q = Buffer_Recv_q[Total_Index];
10460 Area = Buffer_Recv_Area[Total_Index];
10462 xCoord_CG += xCoord*Area;
10463 yCoord_CG += yCoord*Area;
10464 zCoord_CG += zCoord*Area;
10465 PT_Mean += PT*Area;
10466 Mach_Mean += PT*Area;
10474 xCoord_CG = xCoord_CG / TotalArea;
10475 yCoord_CG = yCoord_CG / TotalArea;
10476 zCoord_CG = zCoord_CG / TotalArea;
10477 PT_Mean /= TotalArea;
10478 Mach_Mean /= TotalArea;
10479 q_Mean /= TotalArea;
10483 if (Engine_HalfModel) { yCoord_CG = 0.0; }
10487 TipRadius = 1E-6; HubRadius = 1E6;
10488 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
10489 for (iVertex = 0; iVertex < Buffer_Recv_nVertex[iProcessor]; iVertex++) {
10493 Total_Index = iProcessor*MaxLocalVertex_Surface+iVertex;
10497 xCoord = Buffer_Recv_Coord_x[Total_Index];
10498 yCoord = Buffer_Recv_Coord_y[Total_Index];
10499 if (nDim == 3) zCoord = Buffer_Recv_Coord_z[Total_Index];
10502 Distance = sqrt((xCoord_CG-xCoord)*(xCoord_CG-xCoord) +
10503 (yCoord_CG-yCoord)*(yCoord_CG-yCoord));
10506 Distance = sqrt((xCoord_CG-xCoord)*(xCoord_CG-xCoord) +
10507 (yCoord_CG-yCoord)*(yCoord_CG-yCoord) +
10508 (zCoord_CG-zCoord)*(zCoord_CG-zCoord));
10510 if (Distance > TipRadius) TipRadius = Distance;
10511 if (Distance < HubRadius) HubRadius = Distance;
10516 if (HubRadius/TipRadius < 0.05) HubRadius = 0.0;
10520 Theta = Theta_DC60;
10521 nStation = nStation_DC60;
10529 ProbeArray =
new su2double ** [nAngle];
10530 for (iAngle = 0; iAngle < nAngle; iAngle++) {
10531 ProbeArray[iAngle] =
new su2double * [nStation];
10532 for (iStation = 0; iStation < nStation; iStation++) {
10533 ProbeArray[iAngle][iStation] =
new su2double [5];
10539 r[0] = HubRadius; r[nStation] = TipRadius;
10540 for (iStation = 1; iStation < nStation; iStation++) {
10541 r[iStation] = sqrt( r[iStation-1]*r[iStation-1] + (r[nStation]*r[nStation] - r[0]*r[0])/
float(nStation) );
10546 UpVector[0] = 0.0; UpVector[1] = 0.0; UpVector[2] = 1.0;
10548 for (iAngle = 0; iAngle < nAngle; iAngle++) {
10550 radians = -iAngle*Theta*2.0*
PI_NUMBER/360;
10551 RotatedVector[0] = UpVector[0];
10552 RotatedVector[1] = UpVector[1] * cos(radians) - UpVector[2] * sin(radians);
10553 RotatedVector[2] = UpVector[1] * sin(radians) + UpVector[2] * cos(radians);
10555 for (iStation = 1; iStation <= nStation; iStation++) {
10556 ProbeArray[iAngle][iStation-1][0] = xCoord_CG+RotatedVector[0]*sqrt(0.5*(r[iStation]*r[iStation]+r[iStation-1]*r[iStation-1]));
10557 ProbeArray[iAngle][iStation-1][1] = yCoord_CG+RotatedVector[1]*sqrt(0.5*(r[iStation]*r[iStation]+r[iStation-1]*r[iStation-1]));
10558 ProbeArray[iAngle][iStation-1][2] = zCoord_CG+RotatedVector[2]*sqrt(0.5*(r[iStation]*r[iStation]+r[iStation-1]*r[iStation-1]));
10565 for (iAngle = 0; iAngle < nAngle; iAngle++) {
10567 for (iStation = 0; iStation < nStation; iStation++) {
10568 xCoord_ = ProbeArray[iAngle][iStation][0];
10569 yCoord_ = ProbeArray[iAngle][iStation][1];
10570 zCoord_ = ProbeArray[iAngle][iStation][2];
10574 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
10575 for (iVertex = 0; iVertex < Buffer_Recv_nVertex[iProcessor]; iVertex++) {
10577 Total_Index = iProcessor*MaxLocalVertex_Surface+iVertex;
10578 xCoord = Buffer_Recv_Coord_x[Total_Index];
10579 yCoord = Buffer_Recv_Coord_y[Total_Index];
10580 if (nDim == 3) zCoord = Buffer_Recv_Coord_z[Total_Index];
10582 dx = (xCoord_ - xCoord); dy = (yCoord_ - yCoord);
10583 if (nDim == 3) dz = (zCoord_ - zCoord);
10585 Distance = dx*dx + dy*dy;
if (nDim == 3) Distance += dz*dz; Distance = sqrt(Distance);
10587 if (Engine_HalfModel) {
10591 dx_ = (xCoord_ - xCoord); dy_ = (yCoord_ - yCoord);
10592 if (nDim == 3) dz_ = (zCoord_ - zCoord);
10594 Distance_Mirror = dx_*dx_ + dy_*dy_;
10595 if (nDim == 3) Distance_Mirror += dz_*dz_;
10596 Distance_Mirror = sqrt(Distance_Mirror);
10598 if (Distance_Mirror < Distance) {
10599 Distance = Distance_Mirror;
10600 dx = dx_; dy = dy_;
10601 if (nDim == 3) dz = dz_;
10606 if (Distance <= MinDistance) {
10607 MinDistance = Distance;
10608 ProbeArray[iAngle][iStation][3] = Buffer_Recv_PT[Total_Index];
10609 ProbeArray[iAngle][iStation][4] = Buffer_Recv_q[Total_Index];
10621 PT_Mean = 0.0; q_Mean = 0.0;
10622 for (iAngle = 0; iAngle < nAngle; iAngle++) {
10623 PT_Sector[iAngle] = 0.0;
10624 for (iStation = 0; iStation < nStation; iStation++) {
10625 PT_Sector[iAngle] += ProbeArray[iAngle][iStation][3]/float(nStation);
10626 PT_Mean += ProbeArray[iAngle][iStation][3]/float(nStation*nAngle);
10627 q_Mean += ProbeArray[iAngle][iStation][4]/float(nStation*nAngle);
10633 PT_Sector_Min = PT_Sector[0];
10634 for (iAngle = 1; iAngle < nAngle; iAngle++) {
10635 if (PT_Sector[iAngle] <= PT_Sector_Min) PT_Sector_Min = PT_Sector[iAngle];
10640 Mach_Inf = config->
GetMach();
10643 0.5 * (Gamma - 1.0), Gamma / (Gamma - 1.0));
10645 if (q_Mean != 0.0) DC60 = ((PT_Mean - PT_Sector_Min)*TotalPressure_Inf)/q_Mean;
10656 delete [] PT_Sector;
10658 for (iAngle = 0; iAngle < nAngle; iAngle++) {
10659 for (iStation = 0; iStation < nStation; iStation++) {
10660 delete[] ProbeArray[iAngle][iStation];
10663 delete[] ProbeArray;
10675 ProbeArray =
new su2double ** [nAngle];
10676 for (iAngle = 0; iAngle < nAngle; iAngle++) {
10677 ProbeArray[iAngle] =
new su2double * [nStation];
10678 for (iStation = 0; iStation < nStation; iStation++) {
10679 ProbeArray[iAngle][iStation] =
new su2double [4];
10685 r[0] = HubRadius; r[nStation] = TipRadius;
10686 for (iStation = 1; iStation < nStation; iStation++) {
10687 r[iStation] = sqrt( r[iStation-1]*r[iStation-1] + (r[nStation]*r[nStation] - r[0]*r[0])/
float(nStation) );
10692 UpVector[0] = 0.0; UpVector[1] = 0.0; UpVector[2] = 1.0;
10694 for (iAngle = 0; iAngle < nAngle; iAngle++) {
10696 radians = -iAngle*Theta*2.0*
PI_NUMBER/360;
10697 RotatedVector[0] = UpVector[0];
10698 RotatedVector[1] = UpVector[1] * cos(radians) - UpVector[2] * sin(radians);
10699 RotatedVector[2] = UpVector[1] * sin(radians) + UpVector[2] * cos(radians);
10701 for (iStation = 1; iStation <= nStation; iStation++) {
10702 ProbeArray[iAngle][iStation-1][0] = xCoord_CG+RotatedVector[0]*sqrt(0.5*(r[iStation]*r[iStation]+r[iStation-1]*r[iStation-1]));
10703 ProbeArray[iAngle][iStation-1][1] = yCoord_CG+RotatedVector[1]*sqrt(0.5*(r[iStation]*r[iStation]+r[iStation-1]*r[iStation-1]));
10704 ProbeArray[iAngle][iStation-1][2] = zCoord_CG+RotatedVector[2]*sqrt(0.5*(r[iStation]*r[iStation]+r[iStation-1]*r[iStation-1]));
10711 for (iAngle = 0; iAngle < nAngle; iAngle++) {
10712 for (iStation = 0; iStation < nStation; iStation++) {
10713 xCoord_ = ProbeArray[iAngle][iStation][0];
10714 yCoord_ = ProbeArray[iAngle][iStation][1];
10715 zCoord_ = ProbeArray[iAngle][iStation][2];
10719 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
10720 for (iVertex = 0; iVertex < Buffer_Recv_nVertex[iProcessor]; iVertex++) {
10722 Total_Index = iProcessor*MaxLocalVertex_Surface+iVertex;
10723 xCoord = Buffer_Recv_Coord_x[Total_Index];
10724 yCoord = Buffer_Recv_Coord_y[Total_Index];
10725 if (nDim == 3) zCoord = Buffer_Recv_Coord_z[Total_Index];
10727 dx = (xCoord_ - xCoord); dy = (yCoord_ - yCoord);
10728 if (nDim == 3) dz = (zCoord_ - zCoord);
10730 Distance = dx*dx + dy*dy;
if (nDim == 3) Distance += dz*dz; Distance = sqrt(Distance);
10732 if (Engine_HalfModel) {
10736 dx_ = (xCoord_ - xCoord); dy_ = (yCoord_ - yCoord);
10737 if (nDim == 3) dz_ = (zCoord_ - zCoord);
10739 Distance_Mirror = dx_*dx_ + dy_*dy_;
10740 if (nDim == 3) Distance_Mirror += dz_*dz_;
10741 Distance_Mirror = sqrt(Distance_Mirror);
10743 if (Distance_Mirror < Distance) {
10744 Distance = Distance_Mirror;
10745 dx = dx_; dy = dy_;
10746 if (nDim == 3) dz = dz_;
10751 if (Distance <= MinDistance) {
10752 MinDistance = Distance;
10753 ProbeArray[iAngle][iStation][3] = Buffer_Recv_PT[Total_Index];
10766 PT_Station_Min =
new su2double [nStation];
10769 for (iStation = 0; iStation < nStation; iStation++) {
10770 PT_Station[iStation] = 0.0;
10771 PT_Station_Min[iStation] = ProbeArray[0][iStation][3];
10772 for (iAngle = 0; iAngle < nAngle; iAngle++) {
10773 PT = ProbeArray[iAngle][iStation][3];
10774 PT_Station[iStation] += PT / float(nAngle);
10775 if (PT <= PT_Station_Min[iStation] ) PT_Station_Min[iStation] = PT;
10776 PT_Mean += ProbeArray[iAngle][iStation][3]/float(nStation*nAngle);
10783 for (iStation = 0; iStation < nStation-1; iStation++) {
10784 IDC = max (IDC, 0.5*((PT_Station[iStation] - PT_Station_Min[iStation])/PT_Mean
10785 + (PT_Station[iStation+1] - PT_Station_Min[iStation+1])/PT_Mean) );
10793 for (iStation = 0; iStation < nStation; iStation++) {
10794 IDR = max (IDR, (PT_Mean-PT_Station[iStation])/PT_Mean);
10803 delete [] PT_Station_Min;
10804 delete [] PT_Station;
10810 for (iAngle = 0; iAngle < nAngle; iAngle++) {
10811 for (iStation = 0; iStation < nStation; iStation++) {
10812 xCoord_ = ProbeArray[iAngle][iStation][0];
10813 yCoord_ = ProbeArray[iAngle][iStation][1];
10814 zCoord_ = ProbeArray[iAngle][iStation][2];
10818 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
10819 for (iVertex = 0; iVertex < Buffer_Recv_nVertex[iProcessor]; iVertex++) {
10821 Total_Index = iProcessor*MaxLocalVertex_Surface+iVertex;
10823 xCoord = Buffer_Recv_Coord_x[Total_Index];
10824 yCoord = Buffer_Recv_Coord_y[Total_Index];
10825 if (nDim == 3) zCoord = Buffer_Recv_Coord_z[Total_Index];
10827 dx = (xCoord_ - xCoord); dy = (yCoord_ - yCoord);
10828 if (nDim == 3) dz = (zCoord_ - zCoord);
10830 Distance = dx*dx + dy*dy;
10831 if (nDim == 3) Distance += dz*dz;
10832 Distance = sqrt(Distance);
10834 if (Engine_HalfModel) {
10838 dx_ = (xCoord_ - xCoord); dy_ = (yCoord_ - yCoord);
10839 if (nDim == 3) dz_ = (zCoord_ - zCoord);
10841 Distance_Mirror = dx_*dx_ + dy_*dy_;
10842 if (nDim == 3) Distance_Mirror += dz_*dz_;
10843 Distance_Mirror = sqrt(Distance_Mirror);
10845 if (Distance_Mirror < Distance) {
10846 Distance = Distance_Mirror;
10847 dx = dx_; dy = dy_;
10848 if (nDim == 3) dz = dz_;
10853 if (Distance <= MinDistance) {
10854 MinDistance = Distance;
10855 ProbeArray[iAngle][iStation][3] = Buffer_Recv_Mach[Total_Index];
10867 Mach_Station =
new su2double [nStation];
10868 Mach_Station_Min =
new su2double [nStation];
10871 for (iStation = 0; iStation < nStation; iStation++) {
10872 Mach_Station[iStation] = 0.0;
10873 Mach_Station_Min[iStation] = ProbeArray[0][iStation][3];
10874 for (iAngle = 0; iAngle < nAngle; iAngle++) {
10875 Mach = ProbeArray[iAngle][iStation][3];
10876 Mach_Station[iStation] += Mach / float(nAngle);
10877 if (Mach <= Mach_Station_Min[iStation] ) Mach_Station_Min[iStation] = Mach;
10878 Mach_Mean += ProbeArray[iAngle][iStation][3]/float(nStation*nAngle);
10885 for (iStation = 0; iStation < nStation-1; iStation++) {
10886 if (Mach_Mean != 0)
10887 IDC_Mach = max (IDC_Mach, 0.5*((Mach_Station[iStation] - Mach_Station_Min[iStation])/Mach_Mean
10888 + (Mach_Station[iStation+1] - Mach_Station_Min[iStation+1])/Mach_Mean) );
10896 delete [] Mach_Station_Min;
10897 delete [] Mach_Station;
10902 for (iAngle = 0; iAngle < nAngle; iAngle++) {
10903 for (iStation = 0; iStation < nStation; iStation++) {
10904 delete[] ProbeArray[iAngle][iStation];
10907 delete[] ProbeArray;
10911 Theta = 10; nStation = 20;
10918 ProbeArray =
new su2double ** [nAngle];
10919 for (iAngle = 0; iAngle < nAngle; iAngle++) {
10920 ProbeArray[iAngle] =
new su2double * [nStation];
10921 for (iStation = 0; iStation < nStation; iStation++) {
10922 ProbeArray[iAngle][iStation] =
new su2double [11];
10929 r[nStation] = TipRadius;
10931 for (iStation = 1; iStation < nStation; iStation++) {
10932 r[iStation] = sqrt( r[iStation-1]*r[iStation-1] + (r[nStation]*r[nStation] - r[0]*r[0])/
float(nStation) );
10937 UpVector[0] = 0.0; UpVector[1] = 0.0; UpVector[2] = 1.0;
10939 for (iAngle = 0; iAngle < nAngle; iAngle++) {
10941 radians = -iAngle*Theta*2.0*
PI_NUMBER/360;
10942 RotatedVector[0] = UpVector[0];
10943 RotatedVector[1] = UpVector[1] * cos(radians) - UpVector[2] * sin(radians);
10944 RotatedVector[2] = UpVector[1] * sin(radians) + UpVector[2] * cos(radians);
10946 for (iStation = 1; iStation <= nStation; iStation++) {
10947 ProbeArray[iAngle][iStation-1][0] = xCoord_CG+RotatedVector[0]*sqrt(0.5*(r[iStation]*r[iStation]+r[iStation-1]*r[iStation-1]));
10948 ProbeArray[iAngle][iStation-1][1] = yCoord_CG+RotatedVector[1]*sqrt(0.5*(r[iStation]*r[iStation]+r[iStation-1]*r[iStation-1]));
10949 ProbeArray[iAngle][iStation-1][2] = zCoord_CG+RotatedVector[2]*sqrt(0.5*(r[iStation]*r[iStation]+r[iStation-1]*r[iStation-1]));
10956 for (iAngle = 0; iAngle < nAngle; iAngle++) {
10957 for (iStation = 0; iStation < nStation; iStation++) {
10958 xCoord_ = ProbeArray[iAngle][iStation][0];
10959 yCoord_ = ProbeArray[iAngle][iStation][1];
10960 zCoord_ = ProbeArray[iAngle][iStation][2];
10964 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
10965 for (iVertex = 0; iVertex < Buffer_Recv_nVertex[iProcessor]; iVertex++) {
10967 Total_Index = iProcessor*MaxLocalVertex_Surface+iVertex;
10968 xCoord = Buffer_Recv_Coord_x[Total_Index];
10969 yCoord = Buffer_Recv_Coord_y[Total_Index];
10970 if (nDim == 3) zCoord = Buffer_Recv_Coord_z[Total_Index];
10972 dx = (xCoord_ - xCoord); dy = (yCoord_ - yCoord);
10973 if (nDim == 3) dz = (zCoord_ - zCoord);
10975 Distance = dx*dx + dy*dy;
if (nDim == 3) Distance += dz*dz; Distance = sqrt(Distance);
10979 if (Engine_HalfModel) {
10983 dx_ = (xCoord_ - xCoord);
10984 dy_ = (yCoord_ - yCoord);
10985 if (nDim == 3) dz_ = (zCoord_ - zCoord);
10987 Distance_Mirror = dx_*dx_ + dy_*dy_;
10988 if (nDim == 3) Distance_Mirror += dz_*dz_;
10989 Distance_Mirror = sqrt(Distance_Mirror);
10991 if (Distance_Mirror < Distance) {
10993 Distance = Distance_Mirror;
10994 dx = dx_; dy = dy_;
10995 if (nDim == 3) dz = dz_;
11001 if (Distance <= MinDistance) {
11002 MinDistance = Distance;
11003 ProbeArray[iAngle][iStation][3] = Buffer_Recv_PT[Total_Index];
11004 ProbeArray[iAngle][iStation][4] = Buffer_Recv_TT[Total_Index];
11005 ProbeArray[iAngle][iStation][5] = Buffer_Recv_P[Total_Index];
11006 ProbeArray[iAngle][iStation][6] = Buffer_Recv_T[Total_Index];
11007 ProbeArray[iAngle][iStation][7] = Buffer_Recv_Mach[Total_Index];
11008 ProbeArray[iAngle][iStation][8] = Buffer_Recv_Vel_x[Total_Index];
11009 ProbeArray[iAngle][iStation][9] = SignFlip * Buffer_Recv_Vel_y[Total_Index];
11010 if (nDim == 3) ProbeArray[iAngle][iStation][10] = Buffer_Recv_Vel_z[Total_Index];
11022 yCoord_CG = -yCoord_CG;
11023 for (iAngle = 0; iAngle < nAngle; iAngle++) {
11024 for (iStation = 0; iStation < nStation; iStation++) {
11025 ProbeArray[iAngle][iStation][9] = -ProbeArray[iAngle][iStation][9];
11026 ProbeArray[iAngle][iStation][1] = -ProbeArray[iAngle][iStation][1];
11034 SurfFlow_file <<
"\nDATASET UNSTRUCTURED_GRID" << endl;
11035 SurfFlow_file <<
"POINTS " << nAngle*nStation <<
" float" << endl;
11036 for (iAngle = 0; iAngle < nAngle; iAngle++) {
11037 for (iStation = 0; iStation < nStation; iStation++) {
11038 SurfFlow_file << ProbeArray[iAngle][iStation][1]-yCoord_CG <<
" " << ProbeArray[iAngle][iStation][2]-zCoord_CG <<
" 0.0 " <<
" ";
11042 SurfFlow_file <<
"\nCELLS " << nAngle*(nStation-1) <<
" "<< nAngle*(nStation-1)*5 << endl;
11043 for (iAngle = 0; iAngle < nAngle; iAngle++) {
11044 for (iStation = 0; iStation < nStation-1; iStation++) {
11045 a = iAngle*nStation+iStation; b = a + nStation; c = b+1; d = a +1;
11046 if (iAngle == nAngle-1) { b = iStation; c = b+1; }
11047 SurfFlow_file <<
"4 " << a <<
" "<< b <<
" "<< c <<
" "<< d <<
" ";
11051 SurfFlow_file <<
"\nCELL_TYPES " << nAngle*(nStation-1) << endl;
11052 for (iAngle = 0; iAngle < nAngle; iAngle++) {
11053 for (iStation = 0; iStation < nStation-1; iStation++) {
11054 SurfFlow_file <<
"9 " ;
11058 SurfFlow_file <<
"\nPOINT_DATA " << nAngle*nStation << endl;
11059 SurfFlow_file <<
"SCALARS PT/PT_inf float" << endl;
11060 SurfFlow_file <<
"LOOKUP_TABLE default" << endl;
11062 for (iAngle = 0; iAngle < nAngle; iAngle++) {
11063 for (iStation = 0; iStation < nStation; iStation++) {
11064 SurfFlow_file << ProbeArray[iAngle][iStation][3] <<
" ";
11068 SurfFlow_file <<
"SCALARS TT/TT_inf float" << endl;
11069 SurfFlow_file <<
"LOOKUP_TABLE default" << endl;
11071 for (iAngle = 0; iAngle < nAngle; iAngle++) {
11072 for (iStation = 0; iStation < nStation; iStation++) {
11073 SurfFlow_file << ProbeArray[iAngle][iStation][4] <<
" ";
11077 SurfFlow_file <<
"SCALARS Alpha float" << endl;
11078 SurfFlow_file <<
"LOOKUP_TABLE default" << endl;
11080 for (iAngle = 0; iAngle < nAngle; iAngle++) {
11081 for (iStation = 0; iStation < nStation; iStation++) {
11082 Alpha = atan(ProbeArray[iAngle][iStation][10]/ProbeArray[iAngle][iStation][8])*360.0/(2.0*
PI_NUMBER);
11083 SurfFlow_file << Alpha <<
" ";
11087 SurfFlow_file <<
"SCALARS Beta float" << endl;
11088 SurfFlow_file <<
"LOOKUP_TABLE default" << endl;
11090 for (iAngle = 0; iAngle < nAngle; iAngle++) {
11091 for (iStation = 0; iStation < nStation; iStation++) {
11092 Beta = atan(ProbeArray[iAngle][iStation][9]/ProbeArray[iAngle][iStation][8])*360.0/(2.0*
PI_NUMBER);
11093 SurfFlow_file << Beta <<
" ";
11097 SurfFlow_file <<
"SCALARS Mach float" << endl;
11098 SurfFlow_file <<
"LOOKUP_TABLE default" << endl;
11100 for (iAngle = 0; iAngle < nAngle; iAngle++) {
11101 for (iStation = 0; iStation < nStation; iStation++) {
11102 SurfFlow_file << ProbeArray[iAngle][iStation][7] <<
" ";
11106 SurfFlow_file <<
"VECTORS Velocity float" << endl;
11108 for (iAngle = 0; iAngle < nAngle; iAngle++) {
11109 for (iStation = 0; iStation < nStation; iStation++) {
11110 SurfFlow_file << ProbeArray[iAngle][iStation][8] <<
" " << ProbeArray[iAngle][iStation][9] <<
" " << ProbeArray[iAngle][iStation][10] <<
" ";
11117 SurfFlow_file <<
"ZONE T= \"" << Analyze_TagBound <<
"\", NODES=" << nAngle*nStation <<
" , ELEMENTS= " << nAngle*(nStation-1) <<
", DATAPACKING=POINT, ZONETYPE=FEQUADRILATERAL" << endl;
11119 for (iAngle = 0; iAngle < nAngle; iAngle++) {
11120 for (iStation = 0; iStation < nStation; iStation++) {
11122 Alpha = atan(ProbeArray[iAngle][iStation][10]/ProbeArray[iAngle][iStation][8])*360.0/(2.0*
PI_NUMBER);
11123 Beta = atan(ProbeArray[iAngle][iStation][9]/ProbeArray[iAngle][iStation][8])*360.0/(2.0*
PI_NUMBER);
11125 Mach_ij = ProbeArray[iAngle][iStation][7];
11126 if (iAngle+1 != nAngle) Mach_ip1j = ProbeArray[iAngle+1][iStation][7];
11127 else Mach_ip1j = ProbeArray[0][iStation][7];
11128 if (iAngle-1 != -1) Mach_im1j = ProbeArray[iAngle-1][iStation][7];
11129 else Mach_im1j = ProbeArray[nAngle-1][iStation][7];
11130 if (iStation+1 != nStation) Mach_ijp1 = ProbeArray[iAngle][iStation+1][7];
11131 else Mach_ijp1 = ProbeArray[iAngle][0][7];
11132 if (iStation-1 != -1) Mach_ijm1 = ProbeArray[iAngle][iStation-1][7];
11133 else Mach_ijm1 = ProbeArray[iAngle][nStation-1][7];
11134 Filtered_Mach = (4.0*Mach_ij+Mach_ip1j+Mach_im1j+Mach_ijp1+Mach_ijm1)/8.0;
11136 Alpha_ij = atan(ProbeArray[iAngle][iStation][10]/ProbeArray[iAngle][iStation][8])*360.0/(2.0*
PI_NUMBER);
11137 if (iAngle+1 != nAngle) Alpha_ip1j = atan(ProbeArray[iAngle+1][iStation][10]/ProbeArray[iAngle+1][iStation][8])*360.0/(2.0*
PI_NUMBER);
11138 else Alpha_ip1j = atan(ProbeArray[0][iStation][10]/ProbeArray[0][iStation][8])*360.0/(2.0*
PI_NUMBER);
11139 if (iAngle-1 != -1) Alpha_im1j = atan(ProbeArray[iAngle-1][iStation][10]/ProbeArray[iAngle-1][iStation][8])*360.0/(2.0*
PI_NUMBER);
11140 else Alpha_im1j = atan(ProbeArray[nAngle-1][iStation][10]/ProbeArray[nAngle-1][iStation][8])*360.0/(2.0*
PI_NUMBER);
11141 if (iStation+1 != nStation) Alpha_ijp1 = atan(ProbeArray[iAngle][iStation+1][10]/ProbeArray[iAngle][iStation+1][8])*360.0/(2.0*
PI_NUMBER);
11142 else Alpha_ijp1 = atan(ProbeArray[iAngle][0][10]/ProbeArray[iAngle][0][8])*360.0/(2.0*
PI_NUMBER);
11143 if (iStation-1 != -1) Alpha_ijm1 = atan(ProbeArray[iAngle][iStation-1][10]/ProbeArray[iAngle][iStation-1][8])*360.0/(2.0*
PI_NUMBER);
11144 else Alpha_ijm1 = atan(ProbeArray[iAngle][nStation-1][10]/ProbeArray[iAngle][nStation-1][8])*360.0/(2.0*
PI_NUMBER);
11145 Filtered_Alpha = (4.0*Alpha_ij+Alpha_ip1j+Alpha_im1j+Alpha_ijp1+Alpha_ijm1)/8.0;
11147 Beta_ij = atan(ProbeArray[iAngle][iStation][9]/ProbeArray[iAngle][iStation][8])*360.0/(2.0*
PI_NUMBER);
11148 if (iAngle+1 != nAngle) Beta_ip1j = atan(ProbeArray[iAngle+1][iStation][9]/ProbeArray[iAngle+1][iStation][8])*360.0/(2.0*
PI_NUMBER);
11149 else Beta_ip1j = atan(ProbeArray[0][iStation][9]/ProbeArray[0][iStation][8])*360.0/(2.0*
PI_NUMBER);
11150 if (iAngle-1 != -1) Beta_im1j = atan(ProbeArray[iAngle-1][iStation][9]/ProbeArray[iAngle-1][iStation][8])*360.0/(2.0*
PI_NUMBER);
11151 else Beta_im1j = atan(ProbeArray[nAngle-1][iStation][9]/ProbeArray[nAngle-1][iStation][8])*360.0/(2.0*
PI_NUMBER);
11152 if (iStation+1 != nStation) Beta_ijp1 = atan(ProbeArray[iAngle][iStation+1][9]/ProbeArray[iAngle][iStation+1][8])*360.0/(2.0*
PI_NUMBER);
11153 else Beta_ijp1 = atan(ProbeArray[iAngle][0][9]/ProbeArray[iAngle][0][8])*360.0/(2.0*
PI_NUMBER);
11154 if (iStation-1 != -1) Beta_ijm1 = atan(ProbeArray[iAngle][iStation-1][9]/ProbeArray[iAngle][iStation-1][8])*360.0/(2.0*
PI_NUMBER);
11155 else Beta_ijm1 = atan(ProbeArray[iAngle][nStation-1][9]/ProbeArray[iAngle][nStation-1][8])*360.0/(2.0*
PI_NUMBER);
11156 Filtered_Beta = (4.0*Beta_ij+Beta_ip1j+Beta_im1j+Beta_ijp1+Beta_ijm1)/8.0;
11160 <<
" " << ProbeArray[iAngle][iStation][1]-yCoord_CG
11161 <<
" " << ProbeArray[iAngle][iStation][2]-zCoord_CG
11162 <<
" " << ProbeArray[iAngle][iStation][3] <<
" " << ProbeArray[iAngle][iStation][4]
11163 <<
" " << ProbeArray[iAngle][iStation][5] <<
" " << ProbeArray[iAngle][iStation][6]
11164 <<
" " << ProbeArray[iAngle][iStation][8] <<
" " << ProbeArray[iAngle][iStation][9]
11165 <<
" " << ProbeArray[iAngle][iStation][10]
11166 <<
" " << Alpha <<
" " << Beta <<
" " << ProbeArray[iAngle][iStation][7]
11167 <<
" " << Filtered_Alpha <<
" " << Filtered_Beta <<
" " << Filtered_Mach << endl;
11172 for (iAngle = 0; iAngle < nAngle; iAngle++) {
11173 for (iStation = 0; iStation < nStation-1; iStation++) {
11174 a = iAngle*nStation+iStation; b = a + nStation; c = b+1; d = a +1;
11175 if (iAngle == nAngle-1) { b = iStation; c = b+1; }
11176 SurfFlow_file << a+1 <<
" "<< b+1 <<
" "<< c+1 <<
" "<< d+1 << endl;
11182 SurfFlow_file <<
"TEXT X=14, Y=86, F=HELV-BOLD, C=BLUE, H=2.0, ";
11185 SurfFlow_file <<
"T=\"Rack Size: " << RackProbes <<
" probes at "<< RackAngle <<
"deg." <<
"\\" <<
"\\n";
11186 SurfFlow_file <<
"Mach " << config->
GetMach() <<
", Reynolds " << config->
GetReynolds() <<
", <greek>a</greek> "
11187 << config->
GetAoA() <<
"deg, <greek>b</greek> " << config->
GetAoS() <<
"deg." <<
"\\" <<
"\\n";
11188 SurfFlow_file.precision(1);
11190 SurfFlow_file.precision(4);
11191 SurfFlow_file <<
", MassFlow " << config->
GetSurface_MassFlow(iMarker_Analyze) <<
",\\" <<
"\\n";
11193 SurfFlow_file <<
"DC60 " << config->
GetSurface_DC60(iMarker_Analyze) <<
".\"" << endl;
11201 delete [] Buffer_Recv_Coord_x;
11202 delete [] Buffer_Recv_Coord_y;
11203 if (nDim == 3)
delete [] Buffer_Recv_Coord_z;
11205 delete [] Buffer_Recv_PT;
11206 delete [] Buffer_Recv_TT;
11207 delete [] Buffer_Recv_P;
11208 delete [] Buffer_Recv_T;
11209 delete [] Buffer_Recv_Mach;
11210 delete [] Buffer_Recv_Vel_x;
11211 delete [] Buffer_Recv_Vel_y;
11212 if (nDim == 3)
delete [] Buffer_Recv_Vel_z;
11213 delete [] Buffer_Recv_q;
11215 delete [] Buffer_Recv_Area;
11217 delete [] Buffer_Recv_nVertex;
11220 for (iAngle = 0; iAngle < nAngle; iAngle++) {
11221 for (iStation = 0; iStation < nStation; iStation++) {
11222 delete[] ProbeArray[iAngle][iStation];
11225 delete[] ProbeArray;
11243 delete [] Buffer_Send_Coord_x;
11244 delete [] Buffer_Send_Coord_y;
11245 if (nDim == 3)
delete [] Buffer_Send_Coord_z;
11247 delete [] Buffer_Send_PT;
11248 delete [] Buffer_Send_TT;
11249 delete [] Buffer_Send_P;
11250 delete [] Buffer_Send_T;
11251 delete [] Buffer_Send_Mach;
11252 delete [] Buffer_Send_Vel_x;
11253 delete [] Buffer_Send_Vel_y;
11254 if (nDim == 3)
delete [] Buffer_Send_Vel_z;
11255 delete [] Buffer_Send_q;
11257 delete [] Buffer_Send_Area;
11264 SurfFlow_file.close();
11271 unsigned short ZONE_FLOW,
unsigned short ZONE_STRUCT,
bool header) {
11282 char cstr[200], buffer[50], turb_resid[1000];
11283 string Monitoring_Tag, monitoring_coeff, aeroelastic_coeff, turbo_coeff;
11288 unsigned short direct_diff = config[ZONE_FLOW]->
GetDirectDiff();
11292 strcpy (cstr, filename.data());
11294 if (config[ZONE_FLOW]->GetWrt_Unsteady() && config[ZONE_FLOW]->GetRestart()) {
11301 strcat(cstr, buffer);
11304 if ((config[ZONE_FLOW]->GetOutput_FileFormat() ==
TECPLOT) ||
11305 (config[ZONE_FLOW]->GetOutput_FileFormat() ==
FIELDVIEW))
SPRINTF (buffer,
".dat");
11306 else if ((config[ZONE_FLOW]->GetOutput_FileFormat() ==
TECPLOT_BINARY) ||
11308 else if ((config[ZONE_FLOW]->GetOutput_FileFormat() ==
PARAVIEW) || (config[ZONE_FLOW]->GetOutput_FileFormat() ==
PARAVIEW_BINARY))
SPRINTF (buffer,
".vtk");
11309 strcat(cstr, buffer);
11311 FSIHist_file->open(cstr, ios::out);
11312 FSIHist_file->precision(15);
11316 char begin[]=
"\"ExtIter\",\"BGSIter\"";
11320 char flow_coeff[]=
",\"CL\",\"CD\",\"CMx\",\"CMy\",\"CMz\",\"CL/CD\"";
11321 char fem_coeff[]=
",\"VM_Stress\"";
11322 char of_1[] =
",\"TgtGeom\"";
11323 char of_2[] =
",\"TgtNode\"";
11325 char d_flow_coeff[] =
",\"D(CL)\",\"D(CD)\",\"D(CSF)\",\"D(CMx)\",\"D(CMy)\",\"D(CMz)\",\"D(CFx)\",\"D(CFy)\",\"D(CFz)\",\"D(CL/CD)\",\"D(Custom_ObjFunc)\"";
11329 char fsi_resid[]=
",\"Res_FSI\",\"RelaxCoeff\",\"ForceCoeff\"";
11331 char flow_resid[]=
",\"Res_BGS[F0]\",\"Res_BGS[F1]\",\"Res_BGS[F2]\",\"Res_BGS[F3]\",\"Res_BGS[F4]\"";
11332 char adj_flow_resid[]=
",\"Res_AdjFlow[0]\",\"Res_AdjFlow[1]\",\"Res_AdjFlow[2]\",\"Res_AdjFlow[3]\",\"Res_AdjFlow[4]\"";
11333 char fem_resid[]=
",\"Res_BGS[S0]\",\"Res_BGS[S1]\",\"Res_BGS[S2]\"";
11337 char end[]=
",\"Time(min)\"\n";
11339 if ((config[ZONE_FLOW]->GetOutput_FileFormat() ==
TECPLOT) ||
11340 (config[ZONE_FLOW]->GetOutput_FileFormat() ==
TECPLOT_BINARY) ||
11341 (config[ZONE_FLOW]->GetOutput_FileFormat() ==
FIELDVIEW) ||
11343 FSIHist_file[0] <<
"TITLE = \"SU2 FSI Simulation\"" << endl;
11344 FSIHist_file[0] <<
"VARIABLES = ";
11349 FSIHist_file[0] << begin;
11351 FSIHist_file[0] << fsi_resid;
11353 switch (config[ZONE_FLOW]->GetKind_Solver()) {
11358 FSIHist_file[0] << flow_resid;
11359 if (turbulent) FSIHist_file[0] << turb_resid;
11363 FSIHist_file[0] << adj_flow_resid;
11370 switch (config[ZONE_STRUCT]->GetKind_Solver()) {
11373 FSIHist_file[0] << fem_resid;
11377 FSIHist_file[0] << fem_resid ;
11383 switch (config[ZONE_FLOW]->GetKind_Solver()) {
11386 FSIHist_file[0] << flow_coeff;
11387 if (turbulent) FSIHist_file[0] << turb_resid;
11389 FSIHist_file[0] << d_flow_coeff;
11394 FSIHist_file[0] << adj_flow_resid;
11399 switch (config[ZONE_STRUCT]->GetKind_Solver()) {
11402 FSIHist_file[0] << fem_coeff;
11406 FSIHist_file[0] << fem_coeff;
11411 switch (config[ZONE_STRUCT]->GetKind_ObjFunc()){
11413 FSIHist_file[0] << of_1;
11416 FSIHist_file[0] << of_2;
11422 FSIHist_file[0] << end;
11431 unsigned long iExtIter = config[ZONE_STRUCT]->
GetExtIter();
11433 unsigned long iFSIIter = config[ZONE_STRUCT]->
GetFSIIter();
11436 bool first_iter = ((iExtIter==0) && (iFSIIter == 0));
11444 (config[ZONE_STRUCT]->GetKind_Solver() ==
DISC_ADJ_FEM));
11455 char begin[1000], direct_coeff[1000],
11456 fsi_resid[1000], fsi_coeffs[1000],
11457 flow_resid[1000], fem_resid[1000],
11458 objective_function[1000], end[1000];
11466 unsigned short nVar_FSI = 1, nCoeff_FSI = 2, nVar_Flow = 0, nVar_FEM = 0;
11468 unsigned short iVar;
11471 if (compressible) nVar_Flow = nDim+2;
else nVar_Flow = nDim+1;
11474 if (linear_analysis) nVar_FEM = nDim;
11475 if (nonlinear_analysis) nVar_FEM = 3;
11476 if (disc_adj_fem) nVar_FEM = nDim;
11479 residual_flow =
new su2double[nVar_Flow];
11480 residual_fem =
new su2double[nVar_FEM];
11481 residual_fsi =
new su2double[nVar_FSI];
11482 coeffs_fsi =
new su2double[nCoeff_FSI];
11486 su2double Total_CL = 0.0, Total_CD = 0.0, Total_CMx = 0.0, Total_CMy = 0.0, Total_CMz = 0.0, Total_CEff = 0.0,
11496 bool print_of =
false;
11498 switch (config[ZONE_STRUCT]->GetKind_ObjFunc()){
11511 if ((!disc_adj_flow) && (!disc_adj_fem)){
11513 for (iVar = 0; iVar < nVar_Flow; iVar++)
11514 residual_flow[iVar] = solver_container[ZONE_FLOW][
INST_0][
MESH_0][
FLOW_SOL]->GetRes_BGS(iVar);
11517 for (iVar = 0; iVar < nVar_FEM; iVar++)
11518 residual_fem[iVar] = solver_container[ZONE_STRUCT][
INST_0][
MESH_0][
FEA_SOL]->GetRes_BGS(iVar);
11527 for (iVar = 0; iVar < nVar_Flow; iVar++)
11530 for (iVar = 0; iVar < nVar_FEM; iVar++)
11539 SPRINTF (fsi_resid,
", %14.8e", log10 (residual_fsi[0]));
11540 SPRINTF (fsi_coeffs,
", %14.8e, %14.8e", coeffs_fsi[0], coeffs_fsi[1]);
11544 if (compressible)
SPRINTF (flow_resid,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e", log10 (residual_flow[0]), log10 (residual_flow[1]), log10 (residual_flow[2]), log10 (residual_flow[3]), dummy);
11545 if (incompressible)
SPRINTF (flow_resid,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e", log10 (residual_flow[0]), log10 (residual_flow[1]), log10 (residual_flow[2]), dummy, dummy);
11548 if (compressible)
SPRINTF (flow_resid,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e", log10 (residual_flow[0]), log10 (residual_flow[1]), log10 (residual_flow[2]), log10 (residual_flow[3]), log10 (residual_flow[4]) );
11549 if (incompressible)
SPRINTF (flow_resid,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e", log10 (residual_flow[0]), log10 (residual_flow[1]), log10 (residual_flow[2]), log10 (residual_flow[3]), dummy);
11553 if (nDim == 2)
SPRINTF (fem_resid,
", %14.8e, %14.8e, %14.8e", log10 (residual_fem[0]), log10 (residual_fem[1]), dummy);
11554 else SPRINTF (fem_resid,
", %14.8e, %14.8e, %14.8e", log10 (residual_fem[0]), log10 (residual_fem[1]), log10 (residual_fem[1]));
11557 SPRINTF (direct_coeff,
", %14.8e, %14.8e, %14.8e, %14.8e, %14.8e, %14.8e",Total_CL, Total_CD, Total_CMx, Total_CMy, Total_CMz, Total_CEff);
11559 if (print_of)
SPRINTF (objective_function,
", %14.8e", Total_OF);
11562 if (!print_of) FSIHist_file[0] << begin << fsi_resid << fsi_coeffs << flow_resid << fem_resid << direct_coeff << end;
11563 else FSIHist_file[0] << begin << fsi_resid << fsi_coeffs << flow_resid << fem_resid << direct_coeff << objective_function << end;
11564 FSIHist_file[0].flush();
11567 delete [] residual_flow;
11568 delete [] residual_fem;
11569 delete [] residual_fsi;
11570 delete [] coeffs_fsi;
11579 unsigned short iMarker,iDim, nDim, iVar, nMarker, nVar;
11580 unsigned long iVertex, iPoint, nPoint, nVertex;
11581 su2double *Normal, Prod, Sens = 0.0, SensDim, Area;
11583 unsigned short iZone;
11587 for (iZone = 0; iZone < val_nZone; iZone++) {
11591 nDim = geometry[iZone]->
GetnDim();
11597 vector<string> fieldnames;
11598 fieldnames.push_back(
"\"Point\"");
11599 fieldnames.push_back(
"\"x\"");
11600 fieldnames.push_back(
"\"y\"");
11602 fieldnames.push_back(
"\"z\"");
11604 fieldnames.push_back(
"\"Sensitivity_x\"");
11605 fieldnames.push_back(
"\"Sensitivity_y\"");
11607 fieldnames.push_back(
"\"Sensitivity_z\"");
11609 fieldnames.push_back(
"\"Surface_Sensitivity\"");
11611 solver[iZone] =
new CBaselineSolver(geometry[iZone], config[iZone], nVar+nDim, fieldnames);
11613 for (iPoint = 0; iPoint < nPoint; iPoint++) {
11614 for (iDim = 0; iDim < nDim; iDim++) {
11615 solver[iZone]->
node[iPoint]->
SetSolution(iDim, geometry[iZone]->node[iPoint]->GetCoord(iDim));
11617 for (iVar = 0; iVar < nDim; iVar++) {
11618 solver[iZone]->
node[iPoint]->
SetSolution(iVar+nDim, geometry[iZone]->GetSensitivity(iPoint, iVar));
11624 for (iMarker = 0; iMarker < nMarker; iMarker++) {
11626 if((config[iZone]->GetMarker_All_KindBC(iMarker) ==
HEAT_FLUX ) ||
11627 (config[iZone]->GetMarker_All_KindBC(iMarker) ==
EULER_WALL ) ||
11628 (config[iZone]->GetMarker_All_KindBC(iMarker) ==
TRANSPIRATION ) ||
11629 (config[iZone]->GetMarker_All_KindBC(iMarker) ==
ISOTHERMAL )) {
11631 nVertex = geometry[iZone]->
GetnVertex(iMarker);
11633 for (iVertex = 0; iVertex < nVertex; iVertex++) {
11634 iPoint = geometry[iZone]->
vertex[iMarker][iVertex]->
GetNode();
11638 for (iDim = 0; iDim < nDim; iDim++) {
11646 Prod += Normal[iDim]*SensDim;
11648 Area += Normal[iDim]*Normal[iDim];
11668 for (iZone = 0; iZone < val_nZone; iZone++) {
11669 delete solver[iZone];
11676 unsigned short iMarker_Monitoring;
11677 string inMarker_Tag, outMarker_Tag, inMarkerTag_Mix;
11678 unsigned short nZone = config->
GetnZone();
11682 unsigned short nBladesRow, nStages;
11683 unsigned short iStage;
11687 cout << endl <<
"------------------------- Turbomachinery Summary ------------------------" << endl;
11690 cout << endl <<
"----------------------------- Blade " << iMarker_Monitoring + 1 <<
" -----------------------------------" << endl;
11693 if(iMarker_Monitoring == 0){
11694 cout <<
"BC Inlet convergence monitoring marker " << inMarker_Tag <<
" : "<<endl;
11696 cout <<
" Inlet Total Enthalpy" <<
" Inlet Total Enthalpy BC" <<
" err(%)" << endl;
11699 cout.width(25); cout << abs((TotalEnthalpyIn[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)] - TotalEnthalpyIn_BC[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)])/TotalEnthalpyIn_BC[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)])*100.0;
11702 cout <<
" Inlet Entropy" <<
" Inlet Entropy BC" <<
" err(%)" << endl;
11705 cout.width(25); cout << abs((EntropyIn[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)] - EntropyIn_BC[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)])/EntropyIn_BC[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)])*100.0;
11708 cout <<
" Inlet Absolute Angle" <<
" Inlet Absolute Angle BC" <<
" err(%)" << endl;
11709 cout.width(25); cout << 180.0/
PI_NUMBER*AbsFlowAngleIn[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)];
11710 cout.width(25); cout << 180.0/
PI_NUMBER*FlowAngleIn_BC[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)];
11711 cout.width(25); cout << abs((AbsFlowAngleIn[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)] - FlowAngleIn_BC[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)])/FlowAngleIn_BC[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)])*100.0;
11716 cout <<
" Inlet TurbIntensity" <<
" Inlet TurbIntensity BC" <<
" err(%)" << endl;
11717 cout.width(25); cout << TurbIntensityIn[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)];
11722 cout <<
" Inlet Turb2LamRatio" <<
" Inlet Turb2LamRatio BC" <<
" err(%)" << endl;
11723 cout.width(25); cout << Turb2LamViscRatioIn[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)];
11730 cout <<
" Inlet Nu Factor" <<
" Inlet Nu Factor BC" <<
" err(%)" << endl;
11731 cout.width(25); cout << NuFactorIn[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)];
11741 cout <<
"BC outlet convergence monitoring marker " << outMarker_Tag <<
" : "<<endl;
11743 cout <<
" Outlet Pressure" <<
" Outlet Pressure BC" <<
" err(%)" << endl;
11746 cout.width(25); cout << abs((PressureOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)] - PressureOut_BC[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)])/PressureOut_BC[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)])*100.0;
11751 cout <<
"Convergence monitoring for integral quantities between markers " << inMarker_Tag <<
" and "<< outMarker_Tag <<
" : "<<endl;
11753 cout <<
" Inlet Mass Flow " <<
" Outlet Mass Flow" <<
" err(%)" << endl;
11756 cout.width(25); cout << abs((MassFlowIn[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)] - MassFlowOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)])/MassFlowIn[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)])*100.0;
11762 cout <<
" Inlet Total Rothalpy " <<
" Outlet Total Rothalpy" <<
" err(%)" << endl;
11765 cout.width(25); cout << abs((RothalpyIn[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)] - RothalpyOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)])/RothalpyIn[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)])*100.0;
11768 cout <<
"Blade performance between boundaries " << inMarker_Tag <<
" and "<< outMarker_Tag <<
" : "<<endl;
11770 cout <<
" Total Pressure Loss(%)" <<
" Kinetic Energy Loss(%)" <<
" Entropy Generation(%)" << endl;
11771 cout.width(25); cout << TotalPressureLoss[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)]*100.0;
11772 cout.width(25); cout << KineticEnergyLoss[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)]*100.0;
11773 cout.width(25); cout << EntropyGen[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)]*100.0;
11776 cout <<
" Total Inlet Enthalpy" <<
" Eulerian Work" <<
" Pressure Ratio" << endl;
11779 cout.width(25); cout << PressureRatio[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)];
11782 cout <<
" Inlet Entropy" <<
" Outlet Entropy" <<
" Outlet Is. Enthalpy" << endl;
11788 cout <<
"Cinematic quantities between boundaries " << inMarker_Tag <<
" and "<< outMarker_Tag <<
" : "<<endl;
11790 cout <<
" Inlet Mach"<<
" Inlet Normal Mach" <<
" Inlet Tang. Mach" << endl;
11791 cout.width(25); cout << sqrt(MachIn[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)][0]*MachIn[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)][0] +MachIn[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)][1]*MachIn[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)][1]);
11792 cout.width(25); cout << MachIn[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)][0];
11793 cout.width(25); cout << MachIn[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)][1];
11796 cout <<
" Outlet Mach"<<
" Outlet Normal Mach" <<
" Outlet Tang. Mach" << endl;
11797 cout.width(25); cout << sqrt(MachOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)][0]*MachOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)][0] +MachOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)][1]*MachOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)][1]);
11798 cout.width(25); cout << MachOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)][0];
11799 cout.width(25); cout << MachOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)][1];cout << endl;
11801 cout <<
" Inlet Flow Angle" <<
" Outlet flow Angle " << endl;
11802 cout.width(25); cout << 180.0/
PI_NUMBER*FlowAngleIn[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)];
11803 cout.width(25); cout << 180.0/
PI_NUMBER*FlowAngleOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)];
11807 cout <<
" Inlet Abs Flow Angle" <<
" Outlet Abs Flow Angle " << endl;
11808 cout.width(25); cout << 180.0/
PI_NUMBER*AbsFlowAngleIn[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)];
11809 cout.width(25); cout << 180.0/
PI_NUMBER*AbsFlowAngleOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)];
11811 cout << endl <<
"-------------------------------------------------------------------------" << endl;
11813 if(nZone > 0 && iMarker_Monitoring < config->GetnMarker_Turbomachinery() -1){
11814 cout << endl <<
"---------- Mixing-Plane Interface between Blade " << iMarker_Monitoring + 1 <<
" and Blade " << iMarker_Monitoring + 2 <<
" -----------" << endl;
11817 cout <<
"Convergence monitoring for the outlet " << outMarker_Tag <<
" and the inlet "<< inMarkerTag_Mix <<
" : "<<endl;
11819 cout <<
" Outlet Density " <<
" Inlet Density" <<
" err(%)" << endl;
11822 cout.width(25); cout << abs((DensityIn[iMarker_Monitoring + 1][config->
GetnSpan_iZones(iMarker_Monitoring +1)] - DensityOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)])/DensityIn[iMarker_Monitoring + 1][config->
GetnSpan_iZones(iMarker_Monitoring +1)])*100.0;
11825 cout <<
" Outlet Pressure " <<
" Inlet Pressure" <<
" err(%)" << endl;
11828 cout.width(25); cout << abs((PressureIn[iMarker_Monitoring + 1][config->
GetnSpan_iZones(iMarker_Monitoring +1)] - PressureOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)])/PressureIn[iMarker_Monitoring + 1][config->
GetnSpan_iZones(iMarker_Monitoring +1)])*100.0;
11831 cout <<
" Outlet Normal Velocity " <<
" Inlet Normal Velocity" <<
" err(%)" << endl;
11834 cout.width(25); cout << abs((TurboVelocityIn[iMarker_Monitoring + 1][config->
GetnSpan_iZones(iMarker_Monitoring +1)][0] - TurboVelocityOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)][0])/TurboVelocityIn[iMarker_Monitoring+1][config->
GetnSpan_iZones(iMarker_Monitoring +1)][0])*100.0;
11837 cout <<
" Outlet Tang. Velocity " <<
" Inlet Tang. Velocity" <<
" err(%)" << endl;
11840 cout.width(25); cout << abs((TurboVelocityIn[iMarker_Monitoring + 1][config->
GetnSpan_iZones(iMarker_Monitoring +1)][1] - TurboVelocityOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)][1])/TurboVelocityIn[iMarker_Monitoring+1][config->
GetnSpan_iZones(iMarker_Monitoring +1)][1])*100.0;
11843 cout <<
" Outlet Entropy " <<
" Inlet Entropy" <<
" err(%)" << endl;
11846 cout.width(25); cout << abs((EntropyIn[iMarker_Monitoring + 1][config->
GetnSpan_iZones(iMarker_Monitoring+1)] - EntropyOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)])/EntropyIn[iMarker_Monitoring + 1][config->
GetnSpan_iZones(iMarker_Monitoring+1)])*100.0;
11851 cout <<
" Outlet TurbIntensity " <<
" Inlet TurbIntensity" <<
" err(%)" << endl;
11852 cout.width(25); cout << TurbIntensityOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)];
11853 cout.width(25); cout << TurbIntensityIn[iMarker_Monitoring + 1][config->
GetnSpan_iZones(iMarker_Monitoring +1)];
11854 cout.width(25); cout << abs((TurbIntensityIn[iMarker_Monitoring + 1][config->
GetnSpan_iZones(iMarker_Monitoring+1)] - TurbIntensityOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)])/TurbIntensityIn[iMarker_Monitoring + 1][config->
GetnSpan_iZones(iMarker_Monitoring+1)])*100.0;
11857 cout <<
" Outlet Turb2LamRatio " <<
" Inlet Turb2LamRatio" <<
" err(%)" << endl;
11858 cout.width(25); cout << Turb2LamViscRatioOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)];
11859 cout.width(25); cout << Turb2LamViscRatioIn[iMarker_Monitoring + 1][config->
GetnSpan_iZones(iMarker_Monitoring +1)];
11860 cout.width(25); cout << abs((Turb2LamViscRatioIn[iMarker_Monitoring + 1][config->
GetnSpan_iZones(iMarker_Monitoring+1)] - Turb2LamViscRatioOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)])/Turb2LamViscRatioIn[iMarker_Monitoring + 1][config->
GetnSpan_iZones(iMarker_Monitoring+1)])*100.0;
11863 cout <<
" Outlet Nu Factor " <<
" Inlet Nu Factor" <<
" err(%)" << endl;
11864 cout.width(25); cout << NuFactorOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)];
11865 cout.width(25); cout << NuFactorIn[iMarker_Monitoring + 1][config->
GetnSpan_iZones(iMarker_Monitoring +1)];
11866 cout.width(25); cout << abs((NuFactorIn[iMarker_Monitoring + 1][config->
GetnSpan_iZones(iMarker_Monitoring+1)] - NuFactorOut[iMarker_Monitoring][config->
GetnSpan_iZones(iMarker_Monitoring)])/NuFactorIn[iMarker_Monitoring + 1][config->
GetnSpan_iZones(iMarker_Monitoring+1)])*100.0;
11870 cout << endl <<
"-------------------------------------------------------------------------" << endl;
11877 for(iStage = 0; iStage < nStages; iStage++ ){
11878 cout << endl <<
"----------------------------- Stage " << iStage + 1 <<
" -----------------------------------" << endl;
11881 cout <<
"Stage performance between boundaries " << inMarker_Tag <<
" and "<< outMarker_Tag <<
" : "<<endl;
11883 cout <<
" Total-Total Eff.(%)" <<
" Total-Static Eff.(%)" <<
" Entropy Generation(%)" << endl;
11884 cout.width(25); cout << TotalTotalEfficiency[nBladesRow + iStage][nSpanWiseSections]*100.0;
11885 cout.width(25); cout << TotalStaticEfficiency[nBladesRow + iStage][nSpanWiseSections]*100.0;
11886 cout.width(25); cout << EntropyGen[nBladesRow + iStage][nSpanWiseSections]*100.0;
11889 cout <<
" Pressure Ratio " <<
" Outlet Is. Enthalpy" <<
" In-Out MassFlow Diff (%)" << endl;
11890 cout.width(25); cout << PressureRatio[nBladesRow + iStage][nSpanWiseSections];
11891 cout.width(25); cout << EnthalpyOutIs[nBladesRow + iStage][nSpanWiseSections]*config->
GetEnergy_Ref();
11892 cout.width(25); cout << abs((MassFlowIn[nBladesRow + iStage][nSpanWiseSections] - MassFlowOut[nBladesRow + iStage][nSpanWiseSections])/MassFlowIn[nBladesRow + iStage][nSpanWiseSections])*100.0;
11895 cout << endl <<
"-------------------------------------------------------------------------" << endl;
11900 cout << endl <<
"---------------------------- Turbine ------------------------------------" << endl;
11903 cout <<
"Turbine performance between boundaries " << inMarker_Tag <<
" and "<< outMarker_Tag <<
" : "<<endl;
11905 cout <<
" Total-Total Eff.(%)" <<
" Total-Static Eff.(%)" <<
" Entropy Generation(%)" << endl;
11906 cout.width(25); cout << TotalTotalEfficiency[nBladesRow + nStages][nSpanWiseSections]*100.0;
11907 cout.width(25); cout << TotalStaticEfficiency[nBladesRow + nStages][nSpanWiseSections]*100.0;
11908 cout.width(25); cout << EntropyGen[nBladesRow + nStages][nSpanWiseSections]*100.0;
11911 cout <<
" Pressure Ratio " <<
" Outlet Is. Enthalpy" <<
" In-Out MassFlow Diff (%)" << endl;
11912 cout.width(25); cout << PressureRatio[nBladesRow + nStages][nSpanWiseSections];
11913 cout.width(25); cout << EnthalpyOutIs[nBladesRow + nStages][nSpanWiseSections]*config->
GetEnergy_Ref();;
11914 cout.width(25); cout << abs((MassFlowIn[nBladesRow + nStages][nSpanWiseSections] - MassFlowOut[nBladesRow + nStages][nSpanWiseSections])/MassFlowIn[nBladesRow + nStages][nSpanWiseSections])*100.0;
11916 cout << endl <<
"-------------------------------------------------------------------------" << endl;
11923 unsigned short val_iZone,
bool output) {
11925 string inMarker_Tag, outMarker_Tag, inMarkerTag_Mix;
11926 unsigned short nZone = config[val_iZone]->
GetnZone();
11928 unsigned short iDim, iSpan;
11930 unsigned long iExtIter = config[val_iZone]->
GetExtIter();
11931 su2double* SpanWiseValuesIn, *SpanWiseValuesOut;
11933 string spanwise_performance_filename;
11944 spanwise_performance_filename =
"TURBOMACHINERY/inflow_spanwise_thermodynamic_values.dat";
11947 unsigned short lastindex = spanwise_performance_filename.find_last_of(
".");
11948 spanwise_performance_filename = spanwise_performance_filename.substr(0, lastindex);
11950 spanwise_performance_filename.append(
string(buffer));
11954 myfile.open (spanwise_performance_filename.data(), ios::out | ios::trunc);
11955 myfile.setf(ios::scientific);
11956 myfile.precision(12);
11958 myfile <<
"TITLE = \"Inflow Spanwise Thermodynamic Values. iExtIter = " << iExtIter <<
" \"" << endl;
11959 myfile <<
"VARIABLES =" << endl;
11961 myfile.width(30); myfile <<
"\"SpanWise Value[m]\"";
11962 myfile.width(15); myfile <<
"\"iSpan\"";
11963 myfile.width(30); myfile <<
"\"Pressure[Pa]\"";
11964 myfile.width(30); myfile <<
"\"TotalPressure[Pa]\"";
11965 myfile.width(30); myfile <<
"\"Temperature[K]\"";
11966 myfile.width(30); myfile <<
"\"TotalTemperature[K]\"";
11967 myfile.width(30); myfile <<
"\"Enthalpy[J]\"";
11968 myfile.width(30); myfile <<
"\"TotalEnthalpy[J]\"";
11969 myfile.width(30); myfile <<
"\"Density[kg/m3]\"";
11970 myfile.width(30); myfile <<
"\"Entropy[J/K]\"";
11971 myfile.width(30); myfile <<
"\"TurbIntensity[-]\"";
11972 myfile.width(30); myfile <<
"\"Turb2LamViscRatio[-]\"";
11973 myfile.width(30); myfile <<
"\"NuFactor[-]\"";
11978 myfile.width(30); myfile << SpanWiseValuesIn[iSpan];
11979 myfile.width(15); myfile << iSpan;
11984 myfile.width(30); myfile << EnthalpyIn [val_iZone][iSpan]*config[
ZONE_0]->
GetEnergy_Ref();
11985 myfile.width(30); myfile << TotalEnthalpyIn [val_iZone][iSpan]*config[
ZONE_0]->
GetEnergy_Ref();
11988 if(TurbIntensityIn[val_iZone][iSpan] > 1.0){
11989 myfile.width(30); myfile << TurbIntensityIn [val_iZone][config[
ZONE_0]->
GetnSpan_iZones(val_iZone)/2];
11991 myfile.width(30); myfile << TurbIntensityIn [val_iZone][iSpan];
11993 myfile.width(30); myfile << Turb2LamViscRatioIn [val_iZone][iSpan];
11994 myfile.width(30); myfile << NuFactorIn [val_iZone][iSpan];
12001 spanwise_performance_filename =
"TURBOMACHINERY/outflow_spanwise_thermodynamic_values.dat";
12003 unsigned short lastindex = spanwise_performance_filename.find_last_of(
".");
12004 spanwise_performance_filename = spanwise_performance_filename.substr(0, lastindex);
12006 spanwise_performance_filename.append(
string(buffer));
12009 myfile.open (spanwise_performance_filename.data(), ios::out | ios::trunc);
12010 myfile.setf(ios::scientific);
12011 myfile.precision(12);
12013 myfile <<
"TITLE = \"Outflow Span-wise Thermodynamic Values. iExtIter = " << iExtIter <<
" \"" << endl;
12014 myfile <<
"VARIABLES =" << endl;
12016 myfile.width(30); myfile <<
"\"SpanWise Value[m]\"";
12017 myfile.width(15); myfile <<
"\"iSpan\"";
12018 myfile.width(30); myfile <<
"\"Pressure[Pa]\"";
12019 myfile.width(30); myfile <<
"\"TotalPressure[Pa]\"";
12020 myfile.width(30); myfile <<
"\"Temperature[K]\"";
12021 myfile.width(30); myfile <<
"\"TotalTemperature[K]\"";
12022 myfile.width(30); myfile <<
"\"Enthalpy[J]\"";
12023 myfile.width(30); myfile <<
"\"TotalEnthalpy[J]\"";
12024 myfile.width(30); myfile <<
"\"Density[kg/m3]\"";
12025 myfile.width(30); myfile <<
"\"Entropy[J/K]\"";
12026 myfile.width(30); myfile <<
"\"TurbIntensity[-]\"";
12027 myfile.width(30); myfile <<
"\"Turb2LamViscRatio[-]\"";
12028 myfile.width(30); myfile <<
"\"NuFactor[-]\"";
12034 myfile.width(30); myfile << SpanWiseValuesOut[iSpan];
12035 myfile.width(15); myfile << iSpan;
12040 myfile.width(30); myfile << EnthalpyOut [val_iZone][iSpan]*config[
ZONE_0]->
GetEnergy_Ref();
12041 myfile.width(30); myfile << TotalEnthalpyOut [val_iZone][iSpan]*config[
ZONE_0]->
GetEnergy_Ref();
12044 if(TurbIntensityOut[val_iZone][iSpan] > 1.0){
12045 myfile.width(30); myfile << TurbIntensityOut [val_iZone][config[
ZONE_0]->
GetnSpan_iZones(val_iZone)/2];
12047 myfile.width(30); myfile << TurbIntensityOut [val_iZone][iSpan];
12049 myfile.width(30); myfile << Turb2LamViscRatioOut [val_iZone][iSpan];
12050 myfile.width(30); myfile << NuFactorOut [val_iZone][iSpan];
12057 spanwise_performance_filename =
"TURBOMACHINERY/inflow_spanwise_kinematic_values.dat";
12059 unsigned short lastindex = spanwise_performance_filename.find_last_of(
".");
12060 spanwise_performance_filename = spanwise_performance_filename.substr(0, lastindex);
12062 spanwise_performance_filename.append(
string(buffer));
12065 myfile.open (spanwise_performance_filename.data(), ios::out | ios::trunc);
12066 myfile.setf(ios::scientific);
12067 myfile.precision(12);
12069 myfile <<
"TITLE = \"Inflow Span-wise Kinematic Values. iExtIter = " << iExtIter <<
" \"" << endl;
12070 myfile <<
"VARIABLES =" << endl;
12072 myfile.width(30); myfile <<
"\"SpanWise Value[m]\"";
12073 myfile.width(15); myfile <<
"\"iSpan\"";
12074 myfile.width(30); myfile <<
"\"Normal Mach[-]\"";
12075 myfile.width(30); myfile <<
"\"Tangential Mach[-]\"";
12076 myfile.width(30); myfile <<
"\"3rd Component Mach[-]\"";
12077 myfile.width(30); myfile <<
"\"Mach Module[-]\"";
12078 myfile.width(30); myfile <<
"\"Normal Velocity[m/s]\"";
12079 myfile.width(30); myfile <<
"\"Tangential Velocity[m/s]\"";
12080 myfile.width(30); myfile <<
"\"3rd Component Velocity[m/s]\"";
12081 myfile.width(30); myfile <<
"\"Velocity Module[m/s]\"";
12082 myfile.width(30); myfile <<
"\"Absolute Flow Angle[deg]\"";
12083 myfile.width(30); myfile <<
"\"Relative Flow Angle[deg]\"";
12089 myfile.width(30); myfile << SpanWiseValuesIn[iSpan];
12090 myfile.width(15); myfile << iSpan;
12091 for (iDim = 0; iDim < 4; iDim++){
12092 myfile.width(30); myfile << MachIn [val_iZone][iSpan][iDim];
12094 for (iDim = 0; iDim < 4; iDim++){
12095 myfile.width(30); myfile << TurboVelocityIn [val_iZone][iSpan][iDim]*config[
ZONE_0]->
GetVelocity_Ref();
12097 if(AbsFlowAngleIn[val_iZone][iSpan] != AbsFlowAngleIn[val_iZone][iSpan]){
12098 myfile.width(30); myfile <<
"0.0000";
12101 myfile.width(30); myfile << AbsFlowAngleIn [val_iZone][iSpan]*180.0/
PI_NUMBER;
12103 if(FlowAngleIn[val_iZone][iSpan] != FlowAngleIn[val_iZone][iSpan]){
12104 myfile.width(30); myfile <<
"0.0000";
12107 myfile.width(30); myfile << FlowAngleIn [val_iZone][iSpan]*180.0/
PI_NUMBER;
12115 spanwise_performance_filename =
"TURBOMACHINERY/outflow_spanwise_kinematic_values.dat";
12117 unsigned short lastindex = spanwise_performance_filename.find_last_of(
".");
12118 spanwise_performance_filename = spanwise_performance_filename.substr(0, lastindex);
12120 spanwise_performance_filename.append(
string(buffer));
12123 myfile.open (spanwise_performance_filename.data(), ios::out | ios::trunc);
12124 myfile.setf(ios::scientific);
12125 myfile.precision(12);
12127 myfile <<
"TITLE = \"Outflow Span-wise Kinematic Values. iExtIter = " << iExtIter <<
" \"" << endl;
12128 myfile <<
"VARIABLES =" << endl;
12130 myfile.width(30); myfile <<
"\"SpanWise Value[m]\"";
12131 myfile.width(15); myfile <<
"\"iSpan\"";
12132 myfile.width(30); myfile <<
"\"Normal Mach[-]\"";
12133 myfile.width(30); myfile <<
"\"Tangential Mach[-]\"";
12134 myfile.width(30); myfile <<
"\"3rd Component Mach[-]\"";
12135 myfile.width(30); myfile <<
"\"Mach Module[-]\"";
12136 myfile.width(30); myfile <<
"\"Normal Velocity[m/s]\"";
12137 myfile.width(30); myfile <<
"\"Tangential Velocity[m/s]\"";
12138 myfile.width(30); myfile <<
"\"3rd Component Velocity[m/s]\"";
12139 myfile.width(30); myfile <<
"\"Velocity Module[m/s]\"";
12140 myfile.width(30); myfile <<
"\"Absolute Flow Angle[deg]\"";
12141 myfile.width(30); myfile <<
"\"Relative Flow Angle[deg]\"";
12147 myfile.width(30); myfile << SpanWiseValuesOut[iSpan];
12148 myfile.width(15); myfile << iSpan;
12149 for (iDim = 0; iDim < 4; iDim++){
12150 myfile.width(30); myfile << MachOut [val_iZone][iSpan][iDim];
12152 for (iDim = 0; iDim < 4; iDim++){
12153 myfile.width(30); myfile << TurboVelocityOut [val_iZone][iSpan][iDim]*config[
ZONE_0]->
GetVelocity_Ref();
12155 if(AbsFlowAngleOut[val_iZone][iSpan] != AbsFlowAngleOut[val_iZone][iSpan]){
12156 myfile.width(30); myfile <<
"0.0000";
12159 myfile.width(30); myfile << AbsFlowAngleOut [val_iZone][iSpan]*180.0/
PI_NUMBER;
12161 if(FlowAngleOut[val_iZone][iSpan] != FlowAngleOut[val_iZone][iSpan]){
12162 myfile.width(30); myfile <<
"0.0000";
12165 myfile.width(30); myfile << FlowAngleOut [val_iZone][iSpan]*180.0/
PI_NUMBER;
12178 ofstream HB_output_file;
12179 ofstream mean_HB_file;
12182 su2double *sbuf_var = NULL, *rbuf_var = NULL;
12185 unsigned short iVar, kInst;
12186 unsigned short nVar_output = 5;
12193 for (iVar = 0; iVar < nVar_output; iVar++)
12194 averages[iVar] = 0;
12200 HB_output_file.precision(15);
12201 HB_output_file.open(
"HB_output.csv", ios::out);
12202 HB_output_file <<
"\"time_instance\",\"CL\",\"CD\",\"CMx\",\"CMy\",\"CMz\"" << endl;
12204 mean_HB_file.precision(15);
12205 if (current_iter == 0 && iInst == 1) {
12206 mean_HB_file.open(
"history_HB.plt", ios::trunc);
12207 mean_HB_file <<
"TITLE = \"SU2 HARMONIC BALANCE SIMULATION\"" << endl;
12208 mean_HB_file <<
"VARIABLES = \"Iteration\",\"CL\",\"CD\",\"CMx\",\"CMy\",\"CMz\",\"CT\",\"CQ\",\"CMerit\"" << endl;
12209 mean_HB_file <<
"ZONE T= \"Average Convergence History\"" << endl;
12212 mean_HB_file.open(
"history_HB.plt", ios::out | ios::app);
12220 for (kInst = 0; kInst < val_nInst; kInst++) {
12229 for (iVar = 0; iVar < nVar_output; iVar++) {
12230 rbuf_var[iVar] = sbuf_var[iVar];
12233 HB_output_file << kInst <<
", ";
12234 for (iVar = 0; iVar < nVar_output; iVar++)
12235 HB_output_file << rbuf_var[iVar] <<
", ";
12236 HB_output_file << endl;
12239 for (iVar = 0; iVar < nVar_output; iVar++) {
12240 averages[iVar] += (1.0/
su2double(val_nInst))*rbuf_var[iVar];
12247 mean_HB_file << current_iter <<
", ";
12248 for (iVar = 0; iVar < nVar_output; iVar++) {
12249 mean_HB_file << averages[iVar];
12250 if (iVar < nVar_output-1)
12251 mean_HB_file <<
", ";
12253 mean_HB_file << endl;
12257 HB_output_file.close();
12258 mean_HB_file.close();
12259 delete [] rbuf_var;
12262 delete [] sbuf_var;
12263 delete [] averages;
12269 unsigned long iExtIter,
12270 unsigned short val_nZone,
12271 unsigned short *nInst) {
12273 unsigned short iZone, iVar, iInst;
12274 unsigned long iPoint;
12275 bool compressible =
true;
12277 for (iZone = 0; iZone < val_nZone; iZone++) {
12281 bool fem_solver = ((KindSolver ==
FEM_EULER) ||
12290 for (iInst = 0; iInst < nInst[iZone]; iInst++){
12327 if (
rank ==
MASTER_NODE) cout << endl <<
"Writing comma-separated values (CSV) surface files." << endl;
12329 switch (config[iZone]->GetKind_Solver()) {
12332 solver_container[iZone][iInst][
MESH_0][
FLOW_SOL], iExtIter, iZone, iInst);
12338 solver_container[iZone][iInst][
MESH_0][
FLOW_SOL], iExtIter, iZone, iInst);
12345 if (config[iZone]->GetWrt_InletFile()) {
12360 cout <<
"Loading solution output data locally on each rank." << endl;
12362 switch (config[iZone]->GetKind_Solver()) {
12386 if ((!cont_adj) && (!disc_adj) && (config[iZone]->GetFixed_CL_Mode()) &&
12387 (config[iZone]->GetnExtIter()-config[iZone]->GetIter_dCL_dAlpha() -1 == iExtIter)) {
12390 cout <<
"Storing solution output data locally on each rank (cte. CL mode)." << endl;
12393 for (iPoint = 0; iPoint < geometry[iZone][iInst][
MESH_0]->GetnPoint(); iPoint++) {
12394 Local_Data_Copy[iPoint] =
new su2double[nVar_Par];
12397 for (iPoint = 0; iPoint < geometry[iZone][iInst][
MESH_0]->GetnPoint(); iPoint++) {
12398 for (iVar = 0; iVar < nVar_Par; iVar++) {
12399 Local_Data_Copy[iPoint][iVar] = Local_Data[iPoint][iVar];
12407 if ((!cont_adj) && (!disc_adj) && (config[iZone]->GetFixed_CL_Mode()) &&
12408 (config[iZone]->GetnExtIter() - 1 == iExtIter) && (Local_Data_Copy != NULL)) {
12411 cout <<
"Recovering solution output data locally on each rank (cte. CL mode)." << endl;
12413 for (iPoint = 0; iPoint < geometry[iZone][iInst][
MESH_0]->
GetnPoint(); iPoint++) {
12414 for (iVar = 0; iVar < nVar_Par; iVar++) {
12415 Local_Data[iPoint][iVar] = Local_Data_Copy[iPoint][iVar];
12419 for (iPoint = 0; iPoint < geometry[iZone][iInst][
MESH_0]->
GetnPoint(); iPoint++)
12420 delete [] Local_Data_Copy[iPoint];
12421 delete [] Local_Data_Copy;
12428 if (
rank ==
MASTER_NODE) cout <<
"Sorting output data across all ranks." << endl;
12437 if (config[iZone]->GetWrt_Binary_Restart()) {
12438 if (
rank ==
MASTER_NODE) cout <<
"Writing binary SU2 native restart file." << endl;
12441 if (
rank ==
MASTER_NODE) cout <<
"Writing ASCII SU2 native restart file." << endl;
12447 if (config[iZone]->GetWrt_Slice()) {
12449 solver_container[iZone][iInst][
MESH_0][
FLOW_SOL], iExtIter, iZone, 0);
12451 solver_container[iZone][iInst][
MESH_0][
FLOW_SOL], iExtIter, iZone, 1);
12459 if ((Wrt_Vol || Wrt_Srf) && !fem_solver) {
12464 cout <<
"Preparing element connectivity across all ranks." << endl;
12482 switch (FileFormat) {
12488 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot ASCII file volume solution file." << endl;
12490 solver_container[iZone][iInst][
MESH_0], iZone, val_nZone, iInst, nInst[iZone],
false);
12497 if (
rank ==
MASTER_NODE) cout <<
"FieldView ASCII volume files not available in serial with SU2_CFD." << endl;
12498 if (
rank ==
MASTER_NODE) cout <<
" Run SU2_SOL to generate FieldView ASCII." << endl;
12506 if (
rank ==
MASTER_NODE) cout <<
"Tecplot binary volume files not available in serial with SU2_CFD." << endl;
12507 if (
rank ==
MASTER_NODE) cout <<
" Run SU2_SOL to generate Tecplot binary." << endl;
12508 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot ASCII file volume solution file instead." << endl;
12510 solver_container[iZone][iInst][
MESH_0], iZone, val_nZone, iInst, nInst[iZone],
false);
12517 if (
rank ==
MASTER_NODE) cout <<
"FieldView ASCII volume files not available in serial with SU2_CFD." << endl;
12518 if (
rank ==
MASTER_NODE) cout <<
" Run SU2_SOL to generate FieldView ASCII." << endl;
12525 if (
rank ==
MASTER_NODE) cout <<
"Writing Paraview ASCII volume solution file." << endl;
12527 solver_container[iZone][iInst][
MESH_0], iZone, val_nZone, iInst, nInst[iZone],
false);
12534 if (
rank ==
MASTER_NODE) cout <<
"Writing Paraview binary volume solution file." << endl;
12536 solver_container[iZone][iInst][
MESH_0], iZone, val_nZone,
false);
12547 switch (FileFormat) {
12553 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot ASCII file surface solution file." << endl;
12555 solver_container[iZone][iInst][
MESH_0], iZone, val_nZone, iInst, nInst[iZone],
true);
12562 if (
rank ==
MASTER_NODE) cout <<
"Tecplot binary surface files not available in serial with SU2_CFD." << endl;
12563 if (
rank ==
MASTER_NODE) cout <<
" Run SU2_SOL to generate Tecplot binary." << endl;
12564 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot ASCII file surface solution file instead." << endl;
12566 solver_container[iZone][iInst][
MESH_0], iZone, val_nZone, iInst, nInst[iZone],
true);
12573 if (
rank ==
MASTER_NODE) cout <<
"Writing Paraview ASCII surface solution file." << endl;
12575 solver_container[iZone][iInst][
MESH_0], iZone, val_nZone, iInst, nInst[iZone],
true);
12582 if (
rank ==
MASTER_NODE) cout <<
"Writing Paraview binary surface solution file." << endl;
12584 solver_container[iZone][iInst][
MESH_0], iZone, val_nZone,
true);
12611 Variable_Names.clear();
12619 unsigned short iDim;
12621 unsigned short nDim = geometry->
GetnDim();
12623 unsigned long iVar, jVar;
12624 unsigned long iPoint, jPoint, FirstIndex =
NONE, SecondIndex =
NONE, iMarker, iVertex;
12625 unsigned long nVar_First = 0, nVar_Second = 0, nVar_Consv_Par = 0;
12630 su2double Gas_Constant, Mach2Vel, Mach_Motion, RefDensity, RefPressure = 0.0, factor = 0.0;
12631 su2double *Aux_Frict_x = NULL, *Aux_Frict_y = NULL, *Aux_Frict_z = NULL, *Aux_Heat = NULL, *Aux_yPlus = NULL, *Aux_Buffet = NULL;
12636 bool Wrt_Halo = config->
GetWrt_Halo(), isPeriodic;
12638 int *Local_Halo = NULL;
12640 stringstream varname;
12644 if (grid_movement) {
12648 RefVel2 = (Mach_Motion*Mach2Vel)*(Mach_Motion*Mach2Vel);
12652 for (iDim = 0; iDim < nDim; iDim++)
12657 factor = 1.0 / (0.5*RefDensity*RefArea*RefVel2);
12665 default: SecondIndex =
NONE;
break;
12668 nVar_First = solver[FirstIndex]->
GetnVar();
12669 if (SecondIndex !=
NONE) nVar_Second = solver[SecondIndex]->
GetnVar();
12670 nVar_Consv_Par = nVar_First + nVar_Second;
12684 nVar_Par = 1; Variable_Names.push_back(
"x");
12685 nVar_Par += 1; Variable_Names.push_back(
"y");
12686 if (geometry->
GetnDim() == 3) {
12687 nVar_Par += 1; Variable_Names.push_back(
"z");
12693 nVar_Par += nVar_Consv_Par;
12695 Variable_Names.push_back(
"Density");
12696 Variable_Names.push_back(
"Momentum_x");
12697 Variable_Names.push_back(
"Momentum_y");
12698 if (geometry->
GetnDim() == 3) Variable_Names.push_back(
"Momentum_z");
12699 Variable_Names.push_back(
"Energy");
12701 if (SecondIndex !=
NONE) {
12703 Variable_Names.push_back(
"TKE");
12704 Variable_Names.push_back(
"Omega");
12707 Variable_Names.push_back(
"Nu_Tilde");
12719 nVar_Par += nVar_Consv_Par;
12721 Variable_Names.push_back(
"Limiter_Density");
12722 Variable_Names.push_back(
"Limiter_Momentum_x");
12723 Variable_Names.push_back(
"Limiter_Momentum_y");
12724 if (geometry->
GetnDim() == 3) Variable_Names.push_back(
"Limiter_Momentum_z");
12725 Variable_Names.push_back(
"Limiter_Energy");
12727 if (SecondIndex !=
NONE) {
12729 Variable_Names.push_back(
"Limiter_TKE");
12730 Variable_Names.push_back(
"Limiter_Omega");
12733 Variable_Names.push_back(
"Limiter_Nu_Tilde");
12741 nVar_Par += nVar_Consv_Par;
12743 Variable_Names.push_back(
"Residual_Density");
12744 Variable_Names.push_back(
"Residual_Momentum_x");
12745 Variable_Names.push_back(
"Residual_Momentum_y");
12746 if (geometry->
GetnDim() == 3) Variable_Names.push_back(
"Residual_Momentum_z");
12747 Variable_Names.push_back(
"Residual_Energy");
12749 if (SecondIndex !=
NONE) {
12751 Variable_Names.push_back(
"Residual_TKE");
12752 Variable_Names.push_back(
"Residual_Omega");
12755 Variable_Names.push_back(
"Residual_Nu_Tilde");
12762 if (grid_movement) {
12763 if (geometry->
GetnDim() == 2) nVar_Par += 2;
12764 else if (geometry->
GetnDim() == 3) nVar_Par += 3;
12766 Variable_Names.push_back(
"Grid_Velocity_x");
12767 Variable_Names.push_back(
"Grid_Velocity_y");
12768 if (geometry->
GetnDim() == 3) Variable_Names.push_back(
"Grid_Velocity_z");
12775 Variable_Names.push_back(
"Pressure");
12778 Variable_Names.push_back(
"Temperature");
12779 Variable_Names.push_back(
"Mach");
12784 Variable_Names.push_back(
"Pressure_Coefficient");
12786 Variable_Names.push_back(
"C<sub>p</sub>");
12794 nVar_Par += 1; Variable_Names.push_back(
"Laminar_Viscosity");
12796 Variable_Names.push_back(
"Skin_Friction_Coefficient_x");
12797 Variable_Names.push_back(
"Skin_Friction_Coefficient_y");
12798 if (geometry->
GetnDim() == 3) {
12799 nVar_Par += 1; Variable_Names.push_back(
"Skin_Friction_Coefficient_z");
12802 Variable_Names.push_back(
"Heat_Flux");
12804 nVar_Par += 1; Variable_Names.push_back(
"<greek>m</greek>");
12806 Variable_Names.push_back(
"C<sub>f</sub>_x");
12807 Variable_Names.push_back(
"C<sub>f</sub>_y");
12808 if (geometry->
GetnDim() == 3) {
12809 nVar_Par += 1; Variable_Names.push_back(
"C<sub>f</sub>_z");
12812 Variable_Names.push_back(
"Buffet_Sensor");
12816 Variable_Names.push_back(
"h");
12822 if (Kind_Solver ==
RANS) {
12826 Variable_Names.push_back(
"Y_Plus");
12827 Variable_Names.push_back(
"Eddy_Viscosity");
12829 Variable_Names.push_back(
"y<sup>+</sup>");
12830 Variable_Names.push_back(
"<greek>m</greek><sub>t</sub>");
12838 Variable_Names.push_back(
"Sharp_Edge_Dist");
12847 Variable_Names.push_back(
"gamma_BC");
12849 Variable_Names.push_back(
"<greek>g</greek><sub>BC</sub>");
12855 Variable_Names.push_back(
"DES_LengthScale");
12857 Variable_Names.push_back(
"Wall_Distance");
12862 Variable_Names.push_back(
"Roe_Dissipation");
12884 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
12885 Aux_Frict_x[iPoint] = 0.0;
12886 Aux_Frict_y[iPoint] = 0.0;
12887 Aux_Frict_z[iPoint] = 0.0;
12888 Aux_Heat[iPoint] = 0.0;
12889 Aux_yPlus[iPoint] = 0.0;
12890 Aux_Buffet[iPoint] = 0.0;
12892 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
12894 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
12898 if (geometry->
GetnDim() == 3) Aux_Frict_z[iPoint] = solver[
FLOW_SOL]->GetCSkinFriction(iMarker, iVertex, 2);
12911 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
12912 Local_Data[iPoint] =
new su2double[nVar_Par];
12915 Local_Halo =
new int[geometry->
GetnPoint()];
12916 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
12924 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
12930 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
12934 if (isPeriodic) Local_Halo[iPoint] =
false;
12954 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
12958 if (!Local_Halo[iPoint] || Wrt_Halo) {
12966 for (iDim = 0; iDim < geometry->
GetnDim(); iDim++) {
12967 Local_Data[jPoint][iVar] = geometry->
node[iPoint]->
GetCoord(iDim);
12969 Local_Data[jPoint][iVar] *= 12.0;
12975 for (jVar = 0; jVar < nVar_First; jVar++) {
12976 Local_Data[jPoint][iVar] = solver[FirstIndex]->
node[iPoint]->
GetSolution(jVar);
12983 if (SecondIndex !=
NONE) {
12984 for (jVar = 0; jVar < nVar_Second; jVar++) {
12985 Local_Data[jPoint][iVar] = solver[SecondIndex]->
node[iPoint]->
GetSolution(jVar);
12996 for (jVar = 0; jVar < nVar_First; jVar++) {
13001 if (SecondIndex !=
NONE) {
13002 for (jVar = 0; jVar < nVar_Second; jVar++) {
13012 for (jVar = 0; jVar < nVar_First; jVar++) {
13013 Local_Data[jPoint][iVar] = solver[FirstIndex]->
LinSysRes.
GetBlock(iPoint, jVar);
13017 if (SecondIndex !=
NONE) {
13018 for (jVar = 0; jVar < nVar_Second; jVar++) {
13019 Local_Data[jPoint][iVar] = solver[SecondIndex]->
LinSysRes.
GetBlock(iPoint, jVar);
13030 if (grid_movement) {
13032 Local_Data[jPoint][iVar] = Grid_Vel[0]; iVar++;
13033 Local_Data[jPoint][iVar] = Grid_Vel[1]; iVar++;
13034 if (geometry->
GetnDim() == 3) {
13035 Local_Data[jPoint][iVar] = Grid_Vel[2];
13045 Local_Data[jPoint][iVar] = (solver[
FLOW_SOL]->
node[iPoint]->
GetPressure() - RefPressure)*factor*RefArea; iVar++;
13055 Local_Data[jPoint][iVar] = Aux_Frict_x[iPoint]; iVar++;
13056 Local_Data[jPoint][iVar] = Aux_Frict_y[iPoint]; iVar++;
13057 if (geometry->
GetnDim() == 3) {
13058 Local_Data[jPoint][iVar] = Aux_Frict_z[iPoint];
13062 Local_Data[jPoint][iVar] = Aux_Buffet[iPoint];
13065 Local_Data[jPoint][iVar] = Aux_Heat[iPoint]; iVar++;
13071 if (Kind_Solver ==
RANS) {
13072 Local_Data[jPoint][iVar] = Aux_yPlus[iPoint]; iVar++;
13113 delete [] Aux_Frict_x;
13114 delete [] Aux_Frict_y;
13115 delete [] Aux_Frict_z;
13116 delete [] Aux_Heat;
13117 delete [] Aux_yPlus;
13118 delete [] Aux_Buffet;
13121 delete [] Local_Halo;
13127 unsigned short iDim;
13129 unsigned short nDim = geometry->
GetnDim();
13131 unsigned long iVar, jVar;
13132 unsigned long iPoint, jPoint, FirstIndex =
NONE, SecondIndex =
NONE, iMarker, iVertex;
13133 unsigned long nVar_First = 0, nVar_Second = 0, nVar_Consv_Par = 0;
13138 su2double RefDensity = 0.0, RefPressure = 0.0;
13139 su2double *Aux_Frict_x = NULL, *Aux_Frict_y = NULL, *Aux_Frict_z = NULL, *Aux_Heat = NULL, *Aux_yPlus = NULL;
13144 bool Wrt_Halo = config->
GetWrt_Halo(), isPeriodic;
13149 int *Local_Halo = NULL;
13151 stringstream varname;
13163 for (iDim = 0; iDim < nDim; iDim++)
13177 factor = 1.0 / (0.5*RefDensity*RefArea*RefVel2);
13185 default: SecondIndex =
NONE;
break;
13188 nVar_First = solver[FirstIndex]->
GetnVar();
13189 if ((!energy) && (!weakly_coupled_heat)) nVar_First--;
13190 if (SecondIndex !=
NONE) nVar_Second = solver[SecondIndex]->
GetnVar();
13191 nVar_Consv_Par = nVar_First + nVar_Second;
13205 nVar_Par = 1; Variable_Names.push_back(
"x");
13206 nVar_Par += 1; Variable_Names.push_back(
"y");
13207 if (geometry->
GetnDim() == 3) {
13208 nVar_Par += 1; Variable_Names.push_back(
"z");
13214 nVar_Par += nVar_Consv_Par;
13218 Variable_Names.push_back(
"Pressure");
13219 Variable_Names.push_back(
"Velocity_x");
13220 Variable_Names.push_back(
"Velocity_y");
13221 if (geometry->
GetnDim() == 3) Variable_Names.push_back(
"Velocity_z");
13222 if (energy || weakly_coupled_heat) Variable_Names.push_back(
"Temperature");
13224 if (SecondIndex !=
NONE) {
13226 Variable_Names.push_back(
"TKE");
13227 Variable_Names.push_back(
"Omega");
13230 Variable_Names.push_back(
"Nu_Tilde");
13242 nVar_Par += nVar_Consv_Par;
13244 Variable_Names.push_back(
"Limiter_Pressure");
13245 Variable_Names.push_back(
"Limiter_Velocity_x");
13246 Variable_Names.push_back(
"Limiter_Velocity_y");
13247 if (geometry->
GetnDim() == 3) Variable_Names.push_back(
"Limiter_Velocity_z");
13248 if (energy || weakly_coupled_heat)
13249 Variable_Names.push_back(
"Limiter_Temperature");
13251 if (SecondIndex !=
NONE) {
13253 Variable_Names.push_back(
"Limiter_TKE");
13254 Variable_Names.push_back(
"Limiter_Omega");
13257 Variable_Names.push_back(
"Limiter_Nu_Tilde");
13265 nVar_Par += nVar_Consv_Par;
13267 Variable_Names.push_back(
"Residual_Pressure");
13268 Variable_Names.push_back(
"Residual_Velocity_x");
13269 Variable_Names.push_back(
"Residual_Velocity_y");
13270 if (geometry->
GetnDim() == 3) Variable_Names.push_back(
"Residual_Velocity_z");
13271 if (energy || weakly_coupled_heat)
13272 Variable_Names.push_back(
"Residual_Temperature");
13274 if (SecondIndex !=
NONE) {
13276 Variable_Names.push_back(
"Residual_TKE");
13277 Variable_Names.push_back(
"Residual_Omega");
13280 Variable_Names.push_back(
"Residual_Nu_Tilde");
13287 if (grid_movement) {
13288 if (geometry->
GetnDim() == 2) nVar_Par += 2;
13289 else if (geometry->
GetnDim() == 3) nVar_Par += 3;
13291 Variable_Names.push_back(
"Grid_Velocity_x");
13292 Variable_Names.push_back(
"Grid_Velocity_y");
13293 if (geometry->
GetnDim() == 3) Variable_Names.push_back(
"Grid_Velocity_z");
13301 Variable_Names.push_back(
"Pressure_Coefficient");
13303 Variable_Names.push_back(
"C<sub>p</sub>");
13311 nVar_Par += 1; Variable_Names.push_back(
"Laminar_Viscosity");
13313 Variable_Names.push_back(
"Skin_Friction_Coefficient_x");
13314 Variable_Names.push_back(
"Skin_Friction_Coefficient_y");
13315 if (geometry->
GetnDim() == 3) {
13316 nVar_Par += 1; Variable_Names.push_back(
"Skin_Friction_Coefficient_z");
13318 if (energy || weakly_coupled_heat) {
13320 Variable_Names.push_back(
"Heat_Flux");
13323 nVar_Par += 1; Variable_Names.push_back(
"<greek>m</greek>");
13325 Variable_Names.push_back(
"C<sub>f</sub>_x");
13326 Variable_Names.push_back(
"C<sub>f</sub>_y");
13327 if (geometry->
GetnDim() == 3) {
13328 nVar_Par += 1; Variable_Names.push_back(
"C<sub>f</sub>_z");
13330 if (energy || weakly_coupled_heat) {
13332 Variable_Names.push_back(
"h");
13339 if (Kind_Solver ==
RANS) {
13343 Variable_Names.push_back(
"Y_Plus");
13344 Variable_Names.push_back(
"Eddy_Viscosity");
13346 Variable_Names.push_back(
"y<sup>+</sup>");
13347 Variable_Names.push_back(
"<greek>m</greek><sub>t</sub>");
13355 Variable_Names.push_back(
"Sharp_Edge_Dist");
13364 Variable_Names.push_back(
"gamma_BC");
13366 Variable_Names.push_back(
"<greek>g</greek><sub>BC</sub>");
13372 if (variable_density) {
13374 Variable_Names.push_back(
"Density");
13393 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
13394 Aux_Frict_x[iPoint] = 0.0;
13395 Aux_Frict_y[iPoint] = 0.0;
13396 Aux_Frict_z[iPoint] = 0.0;
13397 Aux_Heat[iPoint] = 0.0;
13398 Aux_yPlus[iPoint] = 0.0;
13400 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
13402 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
13406 if (geometry->
GetnDim() == 3) Aux_Frict_z[iPoint] = solver[
FLOW_SOL]->GetCSkinFriction(iMarker, iVertex, 2);
13418 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
13419 Local_Data[iPoint] =
new su2double[nVar_Par];
13422 Local_Halo =
new int[geometry->
GetnPoint()];
13423 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
13431 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
13437 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
13441 if (isPeriodic) Local_Halo[iPoint] =
false;
13461 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
13465 if (!Local_Halo[iPoint] || Wrt_Halo) {
13473 for (iDim = 0; iDim < geometry->
GetnDim(); iDim++) {
13474 Local_Data[jPoint][iVar] = geometry->
node[iPoint]->
GetCoord(iDim); iVar++;
13479 Local_Data[jPoint][iVar] = solver[FirstIndex]->
node[iPoint]->
GetSolution(0); iVar++;
13480 Local_Data[jPoint][iVar] = solver[FirstIndex]->
node[iPoint]->
GetSolution(1); iVar++;
13481 Local_Data[jPoint][iVar] = solver[FirstIndex]->
node[iPoint]->
GetSolution(2); iVar++;
13483 Local_Data[jPoint][iVar] = solver[FirstIndex]->
node[iPoint]->
GetSolution(3); iVar++;
13485 if (weakly_coupled_heat) {
13488 }
else if (energy) {
13489 Local_Data[jPoint][iVar] = solver[FirstIndex]->
node[iPoint]->
GetSolution(nDim+1);
13496 if (SecondIndex !=
NONE) {
13497 for (jVar = 0; jVar < nVar_Second; jVar++) {
13498 Local_Data[jPoint][iVar] = solver[SecondIndex]->
node[iPoint]->
GetSolution(jVar); iVar++;
13508 for (jVar = 0; jVar < nVar_First; jVar++) {
13513 if (SecondIndex !=
NONE) {
13514 for (jVar = 0; jVar < nVar_Second; jVar++) {
13524 for (jVar = 0; jVar < nVar_First; jVar++) {
13525 Local_Data[jPoint][iVar] = solver[FirstIndex]->
LinSysRes.
GetBlock(iPoint, jVar);
13529 if (SecondIndex !=
NONE) {
13530 for (jVar = 0; jVar < nVar_Second; jVar++) {
13531 Local_Data[jPoint][iVar] = solver[SecondIndex]->
LinSysRes.
GetBlock(iPoint, jVar);
13542 if (grid_movement) {
13544 Local_Data[jPoint][iVar] = Grid_Vel[0]; iVar++;
13545 Local_Data[jPoint][iVar] = Grid_Vel[1]; iVar++;
13546 if (geometry->
GetnDim() == 3) {
13547 Local_Data[jPoint][iVar] = Grid_Vel[2];
13554 Local_Data[jPoint][iVar] = (solver[
FLOW_SOL]->
node[iPoint]->
GetPressure() - RefPressure)*factor*RefArea; iVar++;
13564 Local_Data[jPoint][iVar] = Aux_Frict_x[iPoint]; iVar++;
13565 Local_Data[jPoint][iVar] = Aux_Frict_y[iPoint]; iVar++;
13566 if (geometry->
GetnDim() == 3) {
13567 Local_Data[jPoint][iVar] = Aux_Frict_z[iPoint];
13571 if (energy || weakly_coupled_heat) {
13572 Local_Data[jPoint][iVar] = Aux_Heat[iPoint]; iVar++;
13579 if (Kind_Solver ==
RANS) {
13580 Local_Data[jPoint][iVar] = Aux_yPlus[iPoint]; iVar++;
13598 if (variable_density) {
13618 delete [] Aux_Frict_x;
13619 delete [] Aux_Frict_y;
13620 delete [] Aux_Frict_z;
13621 delete [] Aux_Heat;
13622 delete [] Aux_yPlus;
13625 delete [] Local_Halo;
13631 unsigned short iDim;
13633 unsigned short nDim = geometry->
GetnDim();
13635 unsigned long iVar, jVar;
13636 unsigned long iPoint, jPoint, FirstIndex =
NONE, SecondIndex =
NONE, iMarker, iVertex;
13637 unsigned long nVar_First = 0, nVar_Second = 0, nVar_Consv_Par = 0;
13645 bool Wrt_Halo = config->
GetWrt_Halo(), isPeriodic;
13650 stringstream varname;
13662 nVar_First = solver[FirstIndex]->
GetnVar();
13663 if (SecondIndex !=
NONE) nVar_Second = solver[SecondIndex]->
GetnVar();
13664 nVar_Consv_Par = nVar_First + nVar_Second;
13678 nVar_Par = 1; Variable_Names.push_back(
"x");
13679 nVar_Par += 1; Variable_Names.push_back(
"y");
13680 if (geometry->
GetnDim() == 3) {
13681 nVar_Par += 1; Variable_Names.push_back(
"z");
13687 nVar_Par += nVar_Consv_Par;
13694 if (incompressible) {
13695 Variable_Names.push_back(
"Adjoint_Pressure");
13696 Variable_Names.push_back(
"Adjoint_Velocity_x");
13697 Variable_Names.push_back(
"Adjoint_Velocity_y");
13698 if (geometry->
GetnDim() == 3) Variable_Names.push_back(
"Adjoint_Velocity_z");
13699 Variable_Names.push_back(
"Adjoint_Temperature");
13701 Variable_Names.push_back(
"Adjoint_Density");
13702 Variable_Names.push_back(
"Adjoint_Momentum_x");
13703 Variable_Names.push_back(
"Adjoint_Momentum_y");
13704 if (geometry->
GetnDim() == 3)
13705 Variable_Names.push_back(
"Adjoint_Momentum_z");
13706 Variable_Names.push_back(
"Adjoint_Energy");
13708 if (SecondIndex !=
NONE) {
13710 Variable_Names.push_back(
"Adjoint_TKE");
13711 Variable_Names.push_back(
"Adjoint_Omega");
13714 Variable_Names.push_back(
"Adjoint_Nu_Tilde");
13725 Variable_Names.push_back(
"Sensitivity_x");
13726 Variable_Names.push_back(
"Sensitivity_y");
13728 Variable_Names.push_back(
"Sensitivity_z");
13738 Variable_Names.push_back(
"Sensitivity_Transp");
13749 nVar_Par += nVar_Consv_Par;
13750 if (incompressible) {
13751 Variable_Names.push_back(
"Limiter_Adjoint_Pressure");
13752 Variable_Names.push_back(
"Limiter_Adjoint_Velocity_x");
13753 Variable_Names.push_back(
"Limiter_Adjoint_Velocity_y");
13754 if (geometry->
GetnDim() == 3) Variable_Names.push_back(
"Limiter_Adjoint_Velocity_z");
13755 Variable_Names.push_back(
"Limiter_Adjoint_Temperature");
13757 Variable_Names.push_back(
"Limiter_Adjoint_Density");
13758 Variable_Names.push_back(
"Limiter_Adjoint_Momentum_x");
13759 Variable_Names.push_back(
"Limiter_Adjoint_Momentum_y");
13760 if (geometry->
GetnDim() == 3)
13761 Variable_Names.push_back(
"Limiter_Adjoint_Momentum_z");
13762 Variable_Names.push_back(
"Limiter_Adjoint_Energy");
13764 if (SecondIndex !=
NONE) {
13766 Variable_Names.push_back(
"Limiter_Adjoint_TKE");
13767 Variable_Names.push_back(
"Limiter_Adjoint_Omega");
13770 Variable_Names.push_back(
"Limiter_Adjoint_Nu_Tilde");
13778 nVar_Par += nVar_Consv_Par;
13779 if (incompressible) {
13780 Variable_Names.push_back(
"Residual_Adjoint_Pressure");
13781 Variable_Names.push_back(
"Residual_Adjoint_Velocity_x");
13782 Variable_Names.push_back(
"Residual_Adjoint_Velocity_y");
13783 if (geometry->
GetnDim() == 3) Variable_Names.push_back(
"Residual_Adjoint_Velocity_z");
13784 Variable_Names.push_back(
"Residual_Adjoint_Temperature");
13786 Variable_Names.push_back(
"Residual_Adjoint_Density");
13787 Variable_Names.push_back(
"Residual_Adjoint_Momentum_x");
13788 Variable_Names.push_back(
"Residual_Adjoint_Momentum_y");
13789 if (geometry->
GetnDim() == 3)
13790 Variable_Names.push_back(
"Residual_Adjoint_Momentum_z");
13791 Variable_Names.push_back(
"Residual_Adjoint_Energy");
13793 if (SecondIndex !=
NONE) {
13795 Variable_Names.push_back(
"Residual_Adjoint_TKE");
13796 Variable_Names.push_back(
"Residual_Adjoint_Omega");
13799 Variable_Names.push_back(
"Residual_Adjoint_Nu_Tilde");
13806 if (grid_movement) {
13807 if (geometry->
GetnDim() == 2) nVar_Par += 2;
13808 else if (geometry->
GetnDim() == 3) nVar_Par += 3;
13809 Variable_Names.push_back(
"Grid_Velocity_x");
13810 Variable_Names.push_back(
"Grid_Velocity_y");
13811 if (geometry->
GetnDim() == 3) Variable_Names.push_back(
"Grid_Velocity_z");
13816 nVar_Par += 1; Variable_Names.push_back(
"Surface_Sensitivity");
13826 Variable_Names.push_back(
"Dissipation_Sensor");
13828 Variable_Names.push_back(
"Limiter_Adjoint_Density");
13845 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
13846 Aux_Sens[iPoint] = 0.0;
13848 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++)
13850 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
13854 for (iDim = 0; iDim < nDim; iDim++) Area += Normal[iDim]*Normal[iDim];
13855 Area = sqrt (Area);
13864 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
13865 Local_Data[iPoint] =
new su2double[nVar_Par];
13868 Local_Halo =
new int[geometry->
GetnPoint()];
13869 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
13877 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
13883 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
13887 if (isPeriodic) Local_Halo[iPoint] =
false;
13907 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
13911 if (!Local_Halo[iPoint] || Wrt_Halo) {
13919 for (iDim = 0; iDim < geometry->
GetnDim(); iDim++) {
13920 Local_Data[jPoint][iVar] = geometry->
node[iPoint]->
GetCoord(iDim);
13922 Local_Data[jPoint][iVar] *= 12.0;
13929 for (jVar = 0; jVar < nVar_First; jVar++) {
13930 Local_Data[jPoint][iVar] = solver[FirstIndex]->
node[iPoint]->
GetSolution(jVar);
13939 if (SecondIndex !=
NONE) {
13940 for (jVar = 0; jVar < nVar_Second; jVar++) {
13941 Local_Data[jPoint][iVar] = solver[SecondIndex]->
node[iPoint]->
GetSolution(jVar);
13953 if (geometry->
GetnDim()== 3) {
13970 for (jVar = 0; jVar < nVar_First; jVar++) {
13971 Local_Data[jPoint][iVar] = solver[FirstIndex]->
node[iPoint]->
GetLimiter(jVar);
13974 if (SecondIndex !=
NONE) {
13975 for (jVar = 0; jVar < nVar_Second; jVar++) {
13976 Local_Data[jPoint][iVar] = solver[SecondIndex]->
node[iPoint]->
GetLimiter(jVar);
13983 for (jVar = 0; jVar < nVar_First; jVar++) {
13985 Local_Data[jPoint][iVar] = solver[FirstIndex]->
LinSysRes.
GetBlock(iPoint, jVar);
13987 Local_Data[jPoint][iVar] = solver[FirstIndex]->
node[iPoint]->
GetSolution(jVar) -
13992 if (SecondIndex !=
NONE) {
13993 for (jVar = 0; jVar < nVar_Second; jVar++) {
13995 Local_Data[jPoint][iVar] = solver[SecondIndex]->
LinSysRes.
GetBlock(iPoint, jVar);
13997 Local_Data[jPoint][iVar] = solver[SecondIndex]->
node[iPoint]->
GetSolution(jVar) -
14007 if (grid_movement) {
14009 Local_Data[jPoint][iVar] = Grid_Vel[0]; iVar++;
14010 Local_Data[jPoint][iVar] = Grid_Vel[1]; iVar++;
14011 if (geometry->
GetnDim() == 3) {
14012 Local_Data[jPoint][iVar] = Grid_Vel[2];
14019 Local_Data[iPoint][iVar] = Aux_Sens[iPoint]; iVar++;
14047 delete [] Aux_Sens;
14048 delete [] Local_Halo;
14054 unsigned short iDim;
14056 unsigned long iVar, jVar;
14057 unsigned long iPoint, jPoint, FirstIndex =
NONE, iMarker, iVertex;
14058 unsigned long nVar_First = 0, nVar_Consv_Par = 0;
14060 su2double *Node_Vel = NULL, *Node_Accel = NULL, *Stress = NULL;
14062 bool Wrt_Halo = config->
GetWrt_Halo(), isPeriodic;
14063 int *Local_Halo = NULL;
14065 stringstream varname;
14075 nVar_First = solver[FirstIndex]->
GetnVar();
14076 nVar_Consv_Par = nVar_First;
14090 nVar_Par = 1; Variable_Names.push_back(
"x");
14091 nVar_Par += 1; Variable_Names.push_back(
"y");
14092 if (geometry->
GetnDim() == 3) {
14093 nVar_Par += 1; Variable_Names.push_back(
"z");
14099 nVar_Par += nVar_Consv_Par;
14106 Variable_Names.push_back(
"Displacement_x");
14107 Variable_Names.push_back(
"Displacement_y");
14108 if (geometry->
GetnDim() == 3)
14109 Variable_Names.push_back(
"Displacement_z");
14119 nVar_Par += nVar_Consv_Par;
14120 Variable_Names.push_back(
"Residual_Displacement_x");
14121 Variable_Names.push_back(
"Residual_Displacement_y");
14122 if (geometry->
GetnDim() == 3)
14123 Variable_Names.push_back(
"Residual_Displacement_z");
14131 Variable_Names.push_back(
"Velocity_x");
14132 Variable_Names.push_back(
"Velocity_y");
14133 if (geometry->
GetnDim() == 3) {
14135 Variable_Names.push_back(
"Velocity_z");
14140 Variable_Names.push_back(
"Acceleration_x");
14141 Variable_Names.push_back(
"Acceleration_y");
14142 if (geometry->
GetnDim() == 3) {
14144 Variable_Names.push_back(
"Acceleration_z");
14153 Variable_Names.push_back(
"Sxx");
14154 Variable_Names.push_back(
"Syy");
14155 Variable_Names.push_back(
"Sxy");
14156 if (geometry->
GetnDim() == 3) {
14158 Variable_Names.push_back(
"Szz");
14159 Variable_Names.push_back(
"Sxz");
14160 Variable_Names.push_back(
"Syz");
14166 Variable_Names.push_back(
"Von_Mises_Stress");
14178 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
14179 Local_Data[iPoint] =
new su2double[nVar_Par];
14182 Local_Halo =
new int[geometry->
GetnPoint()];
14183 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
14191 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
14197 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
14201 if (isPeriodic) Local_Halo[iPoint] =
false;
14221 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
14225 if (!Local_Halo[iPoint] || Wrt_Halo) {
14233 for (iDim = 0; iDim < geometry->
GetnDim(); iDim++) {
14234 Local_Data[jPoint][iVar] = geometry->
node[iPoint]->
GetCoord(iDim);
14236 Local_Data[jPoint][iVar] *= 12.0;
14243 for (jVar = 0; jVar < nVar_First; jVar++) {
14244 Local_Data[jPoint][iVar] = solver[FirstIndex]->
node[iPoint]->
GetSolution(jVar);
14250 for (jVar = 0; jVar < nVar_First; jVar++) {
14251 Local_Data[jPoint][iVar] = solver[FirstIndex]->
LinSysRes.
GetBlock(iPoint, jVar);
14266 Local_Data[jPoint][iVar] = Node_Vel[0]; iVar++;
14267 Local_Data[jPoint][iVar] = Node_Vel[1]; iVar++;
14268 if (geometry->
GetnDim() == 3) {
14269 Local_Data[jPoint][iVar] = Node_Vel[2];
14276 Local_Data[jPoint][iVar] = Node_Accel[0]; iVar++;
14277 Local_Data[jPoint][iVar] = Node_Accel[1]; iVar++;
14278 if (geometry->
GetnDim() == 3) {
14279 Local_Data[jPoint][iVar] = Node_Accel[2];
14291 Local_Data[jPoint][iVar] = Stress[0]; iVar++;
14293 Local_Data[jPoint][iVar] = Stress[1]; iVar++;
14295 Local_Data[jPoint][iVar] = Stress[2]; iVar++;
14297 if (geometry->
GetnDim() == 3) {
14299 Local_Data[jPoint][iVar] = Stress[3]; iVar++;
14301 Local_Data[jPoint][iVar] = Stress[4]; iVar++;
14303 Local_Data[jPoint][iVar] = Stress[5]; iVar++;
14327 delete [] Local_Halo;
14333 unsigned short iDim;
14335 unsigned long iVar, jVar;
14336 unsigned long iPoint, jPoint, FirstIndex =
NONE, iMarker, iVertex;
14337 unsigned long nVar_First = 0, nVar_Consv_Par = 0;
14339 bool Wrt_Halo = config->
GetWrt_Halo(), isPeriodic;
14343 stringstream varname;
14352 nVar_First = solver[FirstIndex]->
GetnVar();
14353 nVar_Consv_Par = nVar_First;
14367 nVar_Par = 1; Variable_Names.push_back(
"x");
14368 nVar_Par += 1; Variable_Names.push_back(
"y");
14369 if (geometry->
GetnDim() == 3) {
14370 nVar_Par += 1; Variable_Names.push_back(
"z");
14376 nVar_Par += nVar_Consv_Par;
14377 for (iVar = 0; iVar < nVar_Consv_Par; iVar++) {
14378 varname <<
"Conservative_" << iVar+1;
14379 Variable_Names.push_back(varname.str());
14391 nVar_Par += nVar_Consv_Par;
14392 for (iVar = 0; iVar < nVar_Consv_Par; iVar++) {
14393 varname <<
"Residual_" << iVar+1;
14394 Variable_Names.push_back(varname.str());
14407 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
14408 Local_Data[iPoint] =
new su2double[nVar_Par];
14411 Local_Halo =
new int[geometry->
GetnPoint()];
14412 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
14420 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
14426 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
14430 if (isPeriodic) Local_Halo[iPoint] =
false;
14450 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
14454 if (!Local_Halo[iPoint] || Wrt_Halo) {
14462 for (iDim = 0; iDim < geometry->
GetnDim(); iDim++) {
14463 Local_Data[jPoint][iVar] = geometry->
node[iPoint]->
GetCoord(iDim);
14465 Local_Data[jPoint][iVar] *= 12.0;
14472 for (jVar = 0; jVar < nVar_First; jVar++) {
14473 Local_Data[jPoint][iVar] = solver[FirstIndex]->
node[iPoint]->
GetSolution(jVar);
14479 for (jVar = 0; jVar < nVar_First; jVar++) {
14480 Local_Data[jPoint][iVar] = solver[FirstIndex]->
LinSysRes.
GetBlock(iPoint, jVar);
14499 delete [] Local_Halo;
14519 cout <<
"Sorting volumetric grid connectivity." << endl;
14535 cout <<
"Sorting surface grid connectivity." << endl;
14545 unsigned long nTotal_Elem = nParallel_Tria + nParallel_Quad + nParallel_Tetr + nParallel_Hexa + nParallel_Pris + nParallel_Pyra;
14546 unsigned long nTotal_Surf_Elem = nParallel_Line + nParallel_BoundTria + nParallel_BoundQuad;
14548 nGlobal_Elem_Par = nTotal_Elem;
14549 nSurf_Elem_Par = nTotal_Surf_Elem;
14559 unsigned long iProcessor;
14560 unsigned short NODES_PER_ELEMENT = 0;
14561 unsigned long iPoint, jPoint, kPoint, nLocalPoint, nTotalPoint;
14562 unsigned long nElem_Total = 0, Global_Index;
14564 unsigned long iVertex, iMarker;
14565 int SendRecv, RecvFrom;
14567 bool notPeriodic, notHalo, addedPeriodic, isPeriodic;
14569 int *Local_Halo = NULL;
14570 int *Conn_Elem = NULL;
14583 switch (Elem_Type) {
14611 vector<unsigned long> Added_Periodic;
14612 Added_Periodic.clear();
14615 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
14618 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
14638 unsigned long nAddedPeriodic = 0, maxAddedPeriodic = 0;
14639 unsigned long Buffer_Send_nAddedPeriodic[1], *Buffer_Recv_nAddedPeriodic = NULL;
14640 Buffer_Recv_nAddedPeriodic =
new unsigned long[
size];
14642 nAddedPeriodic = Added_Periodic.size();
14643 Buffer_Send_nAddedPeriodic[0] = nAddedPeriodic;
14651 maxAddedPeriodic = nAddedPeriodic;
14652 Buffer_Recv_nAddedPeriodic[0] = Buffer_Send_nAddedPeriodic[0];
14656 unsigned long *Buffer_Send_AddedPeriodic =
new unsigned long[maxAddedPeriodic];
14657 unsigned long *Buffer_Recv_AddedPeriodic =
new unsigned long[
size*maxAddedPeriodic];
14659 for (iPoint = 0; iPoint < Added_Periodic.size(); iPoint++) {
14660 Buffer_Send_AddedPeriodic[iPoint] = Added_Periodic[iPoint];
14671 for (iPoint = 0; iPoint < maxAddedPeriodic; iPoint++)
14672 Buffer_Recv_AddedPeriodic[iPoint] = Buffer_Send_AddedPeriodic[iPoint];
14682 Local_Halo =
new int[geometry->
GetnPoint()];
14683 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
14686 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
14689 RecvFrom = abs(SendRecv)-1;
14691 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
14698 (SendRecv < 0) && (
rank > RecvFrom));
14710 notPeriodic = (isPeriodic && (SendRecv < 0));
14715 addedPeriodic =
false; kPoint = 0;
14716 for (iProcessor = 0; iProcessor < (
unsigned long)
size; iProcessor++) {
14717 for (jPoint = 0; jPoint < Buffer_Recv_nAddedPeriodic[iProcessor]; jPoint++) {
14718 if (Global_Index == Buffer_Recv_AddedPeriodic[kPoint+jPoint])
14719 addedPeriodic =
true;
14724 kPoint = (iProcessor+1)*maxAddedPeriodic;
14730 if ((notHalo || notPeriodic) && !addedPeriodic) {
14731 Local_Halo[iPoint] =
false;
14742 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
14743 if (Local_Halo[iPoint] ==
false)
14750 nTotalPoint = nLocalPoint;
14757 unsigned long *npoint_procs =
new unsigned long[
size];
14758 unsigned long *starting_node =
new unsigned long[
size];
14759 unsigned long *ending_node =
new unsigned long[
size];
14760 unsigned long *nPoint_Linear =
new unsigned long[
size+1];
14762 unsigned long total_pt_accounted = 0;
14763 for (
int ii = 0; ii <
size; ii++) {
14764 npoint_procs[ii] = nTotalPoint/
size;
14765 total_pt_accounted = total_pt_accounted + npoint_procs[ii];
14770 unsigned long rem_points = nTotalPoint-total_pt_accounted;
14771 for (
unsigned long ii = 0; ii < rem_points; ii++) {
14772 npoint_procs[ii]++;
14777 starting_node[0] = 0;
14778 ending_node[0] = starting_node[0] + npoint_procs[0];
14779 nPoint_Linear[0] = 0;
14780 for (
int ii = 1; ii <
size; ii++) {
14781 starting_node[ii] = ending_node[ii-1];
14782 ending_node[ii] = starting_node[ii] + npoint_procs[ii];
14783 nPoint_Linear[ii] = nPoint_Linear[ii-1] + npoint_procs[ii-1];
14785 nPoint_Linear[
size] = nTotalPoint;
14794 int *nElem_Send =
new int[
size+1]; nElem_Send[0] = 0;
14795 int *nElem_Recv =
new int[
size+1]; nElem_Recv[0] = 0;
14796 int *nElem_Flag =
new int[
size];
14798 for (
int ii=0; ii <
size; ii++) {
14799 nElem_Send[ii] = 0;
14800 nElem_Recv[ii] = 0;
14801 nElem_Flag[ii]= -1;
14803 nElem_Send[
size] = 0; nElem_Recv[
size] = 0;
14805 for (
int ii = 0; ii < (int)geometry->
GetnElem(); ii++ ) {
14807 for (
int jj = 0; jj < NODES_PER_ELEMENT; jj++ ) {
14818 for (
int kk = 0; kk < NODES_PER_ELEMENT; kk++) {
14821 if (newID < Global_Index) Global_Index = newID;
14826 iProcessor = Global_Index/npoint_procs[0];
14827 if (iProcessor >= (
unsigned long)
size)
14828 iProcessor = (
unsigned long)
size-1;
14829 if (Global_Index >= nPoint_Linear[iProcessor])
14830 while(Global_Index >= nPoint_Linear[iProcessor+1]) iProcessor++;
14832 while(Global_Index < nPoint_Linear[iProcessor]) iProcessor--;
14837 if ((nElem_Flag[iProcessor] != ii)) {
14838 nElem_Flag[iProcessor] = ii;
14839 nElem_Send[iProcessor+1]++;
14854 nElem_Recv[1] = nElem_Send[1];
14862 int nSends = 0, nRecvs = 0;
14863 for (
int ii=0; ii <
size; ii++) nElem_Flag[ii] = -1;
14865 for (
int ii = 0; ii <
size; ii++) {
14866 if ((ii !=
rank) && (nElem_Send[ii+1] > 0)) nSends++;
14867 if ((ii !=
rank) && (nElem_Recv[ii+1] > 0)) nRecvs++;
14869 nElem_Send[ii+1] += nElem_Send[ii];
14870 nElem_Recv[ii+1] += nElem_Recv[ii];
14876 unsigned long *connSend = NULL;
14877 connSend =
new unsigned long[NODES_PER_ELEMENT*nElem_Send[
size]];
14878 for (
int ii = 0; ii < NODES_PER_ELEMENT*nElem_Send[
size]; ii++)
14883 unsigned short *haloSend =
new unsigned short[nElem_Send[
size]];
14884 for (
int ii = 0; ii < nElem_Send[
size]; ii++)
14885 haloSend[ii] =
false;
14890 unsigned long *index =
new unsigned long[
size];
14891 for (
int ii=0; ii <
size; ii++) index[ii] = NODES_PER_ELEMENT*nElem_Send[ii];
14893 unsigned long *haloIndex =
new unsigned long[
size];
14894 for (
int ii=0; ii <
size; ii++) haloIndex[ii] = nElem_Send[ii];
14899 for (
int ii = 0; ii < (int)geometry->
GetnElem(); ii++) {
14901 for (
int jj = 0; jj < NODES_PER_ELEMENT; jj++ ) {
14912 for (
int kk = 0; kk < NODES_PER_ELEMENT; kk++) {
14915 if (newID < Global_Index) Global_Index = newID;
14920 iProcessor = Global_Index/npoint_procs[0];
14921 if (iProcessor >= (
unsigned long)
size)
14922 iProcessor = (
unsigned long)
size-1;
14923 if (Global_Index >= nPoint_Linear[iProcessor])
14924 while(Global_Index >= nPoint_Linear[iProcessor+1]) iProcessor++;
14926 while(Global_Index < nPoint_Linear[iProcessor]) iProcessor--;
14930 if (nElem_Flag[iProcessor] != ii) {
14932 nElem_Flag[iProcessor] = ii;
14933 unsigned long nn = index[iProcessor];
14934 unsigned long mm = haloIndex[iProcessor];
14938 for (
int kk = 0; kk < NODES_PER_ELEMENT; kk++) {
14946 if (Local_Halo[iPoint]) haloSend[mm] =
true;
14952 index[iProcessor] += NODES_PER_ELEMENT;
14953 haloIndex[iProcessor]++;
14963 delete [] haloIndex;
14970 unsigned long *connRecv = NULL;
14971 connRecv =
new unsigned long[NODES_PER_ELEMENT*nElem_Recv[
size]];
14972 for (
int ii = 0; ii < NODES_PER_ELEMENT*nElem_Recv[
size]; ii++)
14975 unsigned short *haloRecv =
new unsigned short[nElem_Recv[
size]];
14976 for (
int ii = 0; ii < nElem_Recv[
size]; ii++)
14977 haloRecv[ii] =
false;
14988 unsigned long iMessage = 0;
14989 for (
int ii=0; ii<
size; ii++) {
14990 if ((ii !=
rank) && (nElem_Recv[ii+1] > nElem_Recv[ii])) {
14991 int ll = NODES_PER_ELEMENT*nElem_Recv[ii];
14992 int kk = nElem_Recv[ii+1] - nElem_Recv[ii];
14993 int count = NODES_PER_ELEMENT*kk;
15005 for (
int ii=0; ii<
size; ii++) {
15006 if ((ii !=
rank) && (nElem_Send[ii+1] > nElem_Send[ii])) {
15007 int ll = NODES_PER_ELEMENT*nElem_Send[ii];
15008 int kk = nElem_Send[ii+1] - nElem_Send[ii];
15009 int count = NODES_PER_ELEMENT*kk;
15011 int tag =
rank + 1;
15021 for (
int ii=0; ii<
size; ii++) {
15022 if ((ii !=
rank) && (nElem_Recv[ii+1] > nElem_Recv[ii])) {
15023 int ll = nElem_Recv[ii];
15024 int kk = nElem_Recv[ii+1] - nElem_Recv[ii];
15037 for (
int ii=0; ii<
size; ii++) {
15038 if ((ii !=
rank) && (nElem_Send[ii+1] > nElem_Send[ii])) {
15039 int ll = nElem_Send[ii];
15040 int kk = nElem_Send[ii+1] - nElem_Send[ii];
15043 int tag =
rank + 1;
15053 int mm = NODES_PER_ELEMENT*nElem_Recv[
rank];
15054 int ll = NODES_PER_ELEMENT*nElem_Send[
rank];
15055 int kk = NODES_PER_ELEMENT*nElem_Send[
rank+1];
15057 for (
int nn=ll; nn<kk; nn++, mm++) connRecv[mm] = connSend[nn];
15059 mm = nElem_Recv[
rank];
15060 ll = nElem_Send[
rank];
15061 kk = nElem_Send[
rank+1];
15063 for (
int nn=ll; nn<kk; nn++, mm++) haloRecv[mm] = haloSend[nn];
15068 int number = 2*nSends;
15069 for (
int ii = 0; ii < number; ii++)
15073 for (
int ii = 0; ii < number; ii++)
15076 delete [] send_req;
15077 delete [] recv_req;
15085 if (nElem_Recv[
size] > 0) Conn_Elem =
new int[NODES_PER_ELEMENT*nElem_Recv[
size]];
15086 int count = 0; nElem_Total = 0;
15087 for (
int ii = 0; ii < nElem_Recv[
size]; ii++) {
15088 if (!haloRecv[ii]) {
15090 for (
int jj = 0; jj < NODES_PER_ELEMENT; jj++) {
15091 Conn_Elem[count] = (int)connRecv[ii*NODES_PER_ELEMENT+jj] + 1;
15100 switch (Elem_Type) {
15102 nParallel_Tria = nElem_Total;
15103 if (nParallel_Tria > 0) Conn_Tria_Par = Conn_Elem;
15106 nParallel_Quad = nElem_Total;
15107 if (nParallel_Quad > 0) Conn_Quad_Par = Conn_Elem;
15110 nParallel_Tetr = nElem_Total;
15111 if (nParallel_Tetr > 0) Conn_Tetr_Par = Conn_Elem;
15114 nParallel_Hexa = nElem_Total;
15115 if (nParallel_Hexa > 0) Conn_Hexa_Par = Conn_Elem;
15118 nParallel_Pris = nElem_Total;
15119 if (nParallel_Pris > 0) Conn_Pris_Par = Conn_Elem;
15122 nParallel_Pyra = nElem_Total;
15123 if (nParallel_Pyra > 0) Conn_Pyra_Par = Conn_Elem;
15132 delete [] connSend;
15133 delete [] connRecv;
15134 delete [] haloSend;
15135 delete [] haloRecv;
15136 delete [] Local_Halo;
15137 delete [] nElem_Recv;
15138 delete [] nElem_Send;
15139 delete [] nElem_Flag;
15140 delete [] Buffer_Recv_nAddedPeriodic;
15141 delete [] Buffer_Send_AddedPeriodic;
15142 delete [] Buffer_Recv_AddedPeriodic;
15143 delete [] npoint_procs;
15144 delete [] starting_node;
15145 delete [] ending_node;
15146 delete [] nPoint_Linear;
15152 unsigned long iProcessor;
15153 unsigned short NODES_PER_ELEMENT;
15154 unsigned long iPoint, jPoint, kPoint, nLocalPoint, nTotalPoint;
15155 unsigned long nElem_Total = 0, Global_Index;
15157 unsigned long iVertex, iMarker;
15158 int SendRecv, RecvFrom;
15160 bool notPeriodic, notHalo, addedPeriodic, isPeriodic;
15162 int *Local_Halo = NULL;
15163 int *Conn_Elem = NULL;
15176 switch (Elem_Type) {
15188 NODES_PER_ELEMENT = 0;
15197 vector<unsigned long> Added_Periodic;
15198 Added_Periodic.clear();
15201 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
15204 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
15224 unsigned long nAddedPeriodic = 0, maxAddedPeriodic = 0;
15225 unsigned long Buffer_Send_nAddedPeriodic[1], *Buffer_Recv_nAddedPeriodic = NULL;
15226 Buffer_Recv_nAddedPeriodic =
new unsigned long[
size];
15228 nAddedPeriodic = Added_Periodic.size();
15229 Buffer_Send_nAddedPeriodic[0] = nAddedPeriodic;
15237 maxAddedPeriodic = nAddedPeriodic;
15238 Buffer_Recv_nAddedPeriodic[0] = Buffer_Send_nAddedPeriodic[0];
15242 unsigned long *Buffer_Send_AddedPeriodic =
new unsigned long[maxAddedPeriodic];
15243 unsigned long *Buffer_Recv_AddedPeriodic =
new unsigned long[
size*maxAddedPeriodic];
15245 for (iPoint = 0; iPoint < Added_Periodic.size(); iPoint++) {
15246 Buffer_Send_AddedPeriodic[iPoint] = Added_Periodic[iPoint];
15257 for (iPoint = 0; iPoint < maxAddedPeriodic; iPoint++)
15258 Buffer_Recv_AddedPeriodic[iPoint] = Buffer_Send_AddedPeriodic[iPoint];
15268 Local_Halo =
new int[geometry->
GetnPoint()];
15269 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
15272 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
15275 RecvFrom = abs(SendRecv)-1;
15277 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
15284 (SendRecv < 0) && (
rank > RecvFrom));
15296 notPeriodic = (isPeriodic && (SendRecv < 0));
15301 addedPeriodic =
false; kPoint = 0;
15302 for (iProcessor = 0; iProcessor < (
unsigned long)
size; iProcessor++) {
15303 for (jPoint = 0; jPoint < Buffer_Recv_nAddedPeriodic[iProcessor]; jPoint++) {
15304 if (Global_Index == Buffer_Recv_AddedPeriodic[kPoint+jPoint])
15305 addedPeriodic =
true;
15310 kPoint = (iProcessor+1)*maxAddedPeriodic;
15316 if ((notHalo || notPeriodic) && !addedPeriodic) {
15317 Local_Halo[iPoint] =
false;
15328 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
15329 if (Local_Halo[iPoint] ==
false)
15336 nTotalPoint = nLocalPoint;
15343 unsigned long *npoint_procs =
new unsigned long[
size];
15344 unsigned long *starting_node =
new unsigned long[
size];
15345 unsigned long *ending_node =
new unsigned long[
size];
15346 unsigned long *nPoint_Linear =
new unsigned long[
size+1];
15348 unsigned long total_pt_accounted = 0;
15349 for (
int ii = 0; ii <
size; ii++) {
15350 npoint_procs[ii] = nTotalPoint/
size;
15351 total_pt_accounted = total_pt_accounted + npoint_procs[ii];
15356 unsigned long rem_points = nTotalPoint-total_pt_accounted;
15357 for (
unsigned long ii = 0; ii < rem_points; ii++) {
15358 npoint_procs[ii]++;
15363 starting_node[0] = 0;
15364 ending_node[0] = starting_node[0] + npoint_procs[0];
15365 nPoint_Linear[0] = 0;
15366 for (
int ii = 1; ii <
size; ii++) {
15367 starting_node[ii] = ending_node[ii-1];
15368 ending_node[ii] = starting_node[ii] + npoint_procs[ii];
15369 nPoint_Linear[ii] = nPoint_Linear[ii-1] + npoint_procs[ii-1];
15371 nPoint_Linear[
size] = nTotalPoint;
15380 int *nElem_Send =
new int[
size+1]; nElem_Send[0] = 0;
15381 int *nElem_Recv =
new int[
size+1]; nElem_Recv[0] = 0;
15382 int *nElem_Flag =
new int[
size];
15384 for (
int ii=0; ii <
size; ii++) {
15385 nElem_Send[ii] = 0;
15386 nElem_Recv[ii] = 0;
15387 nElem_Flag[ii]= -1;
15389 nElem_Send[
size] = 0; nElem_Recv[
size] = 0;
15391 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
15394 for (
int ii = 0; ii < (int)geometry->
GetnElem_Bound(iMarker); ii++) {
15397 for (
int jj = 0; jj < NODES_PER_ELEMENT; jj++ ) {
15408 for (
int kk = 0; kk < NODES_PER_ELEMENT; kk++) {
15411 if (newID < Global_Index) Global_Index = newID;
15416 iProcessor = Global_Index/npoint_procs[0];
15417 if (iProcessor >= (
unsigned long)
size)
15418 iProcessor = (
unsigned long)
size-1;
15419 if (Global_Index >= nPoint_Linear[iProcessor])
15420 while(Global_Index >= nPoint_Linear[iProcessor+1]) iProcessor++;
15422 while(Global_Index < nPoint_Linear[iProcessor]) iProcessor--;
15427 if ((nElem_Flag[iProcessor] != ii)) {
15428 nElem_Flag[iProcessor] = ii;
15429 nElem_Send[iProcessor+1]++;
15446 nElem_Recv[1] = nElem_Send[1];
15454 int nSends = 0, nRecvs = 0;
15455 for (
int ii=0; ii <
size; ii++) nElem_Flag[ii] = -1;
15457 for (
int ii = 0; ii <
size; ii++) {
15458 if ((ii !=
rank) && (nElem_Send[ii+1] > 0)) nSends++;
15459 if ((ii !=
rank) && (nElem_Recv[ii+1] > 0)) nRecvs++;
15461 nElem_Send[ii+1] += nElem_Send[ii];
15462 nElem_Recv[ii+1] += nElem_Recv[ii];
15468 unsigned long *connSend = NULL;
15469 connSend =
new unsigned long[NODES_PER_ELEMENT*nElem_Send[
size]];
15470 for (
int ii = 0; ii < NODES_PER_ELEMENT*nElem_Send[
size]; ii++)
15475 unsigned short *haloSend =
new unsigned short[nElem_Send[
size]];
15476 for (
int ii = 0; ii < nElem_Send[
size]; ii++)
15477 haloSend[ii] =
false;
15482 unsigned long *index =
new unsigned long[
size];
15483 for (
int ii=0; ii <
size; ii++) index[ii] = NODES_PER_ELEMENT*nElem_Send[ii];
15485 unsigned long *haloIndex =
new unsigned long[
size];
15486 for (
int ii=0; ii <
size; ii++) haloIndex[ii] = nElem_Send[ii];
15491 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
15494 for (
int ii = 0; ii < (int)geometry->
GetnElem_Bound(iMarker); ii++) {
15497 for (
int jj = 0; jj < NODES_PER_ELEMENT; jj++ ) {
15508 for (
int kk = 0; kk < NODES_PER_ELEMENT; kk++) {
15511 if (newID < Global_Index) Global_Index = newID;
15516 iProcessor = Global_Index/npoint_procs[0];
15517 if (iProcessor >= (
unsigned long)
size)
15518 iProcessor = (
unsigned long)
size-1;
15519 if (Global_Index >= nPoint_Linear[iProcessor])
15520 while(Global_Index >= nPoint_Linear[iProcessor+1]) iProcessor++;
15522 while(Global_Index < nPoint_Linear[iProcessor]) iProcessor--;
15526 if (nElem_Flag[iProcessor] != ii) {
15528 nElem_Flag[iProcessor] = ii;
15529 unsigned long nn = index[iProcessor];
15530 unsigned long mm = haloIndex[iProcessor];
15534 for (
int kk = 0; kk < NODES_PER_ELEMENT; kk++) {
15542 if (Local_Halo[iPoint]) haloSend[mm] =
true;
15548 index[iProcessor] += NODES_PER_ELEMENT;
15549 haloIndex[iProcessor]++;
15561 delete [] haloIndex;
15568 unsigned long *connRecv = NULL;
15569 connRecv =
new unsigned long[NODES_PER_ELEMENT*nElem_Recv[
size]];
15570 for (
int ii = 0; ii < NODES_PER_ELEMENT*nElem_Recv[
size]; ii++)
15573 unsigned short *haloRecv =
new unsigned short[nElem_Recv[
size]];
15574 for (
int ii = 0; ii < nElem_Recv[
size]; ii++)
15575 haloRecv[ii] =
false;
15586 unsigned long iMessage = 0;
15587 for (
int ii=0; ii<
size; ii++) {
15588 if ((ii !=
rank) && (nElem_Recv[ii+1] > nElem_Recv[ii])) {
15589 int ll = NODES_PER_ELEMENT*nElem_Recv[ii];
15590 int kk = nElem_Recv[ii+1] - nElem_Recv[ii];
15591 int count = NODES_PER_ELEMENT*kk;
15603 for (
int ii=0; ii<
size; ii++) {
15604 if ((ii !=
rank) && (nElem_Send[ii+1] > nElem_Send[ii])) {
15605 int ll = NODES_PER_ELEMENT*nElem_Send[ii];
15606 int kk = nElem_Send[ii+1] - nElem_Send[ii];
15607 int count = NODES_PER_ELEMENT*kk;
15609 int tag =
rank + 1;
15619 for (
int ii=0; ii<
size; ii++) {
15620 if ((ii !=
rank) && (nElem_Recv[ii+1] > nElem_Recv[ii])) {
15621 int ll = nElem_Recv[ii];
15622 int kk = nElem_Recv[ii+1] - nElem_Recv[ii];
15635 for (
int ii=0; ii<
size; ii++) {
15636 if ((ii !=
rank) && (nElem_Send[ii+1] > nElem_Send[ii])) {
15637 int ll = nElem_Send[ii];
15638 int kk = nElem_Send[ii+1] - nElem_Send[ii];
15641 int tag =
rank + 1;
15651 int mm = NODES_PER_ELEMENT*nElem_Recv[
rank];
15652 int ll = NODES_PER_ELEMENT*nElem_Send[
rank];
15653 int kk = NODES_PER_ELEMENT*nElem_Send[
rank+1];
15655 for (
int nn=ll; nn<kk; nn++, mm++) connRecv[mm] = connSend[nn];
15657 mm = nElem_Recv[
rank];
15658 ll = nElem_Send[
rank];
15659 kk = nElem_Send[
rank+1];
15661 for (
int nn=ll; nn<kk; nn++, mm++) haloRecv[mm] = haloSend[nn];
15666 int number = 2*nSends;
15667 for (
int ii = 0; ii < number; ii++)
15671 for (
int ii = 0; ii < number; ii++)
15674 delete [] send_req;
15675 delete [] recv_req;
15683 if (nElem_Recv[
size] > 0) Conn_Elem =
new int[NODES_PER_ELEMENT*nElem_Recv[
size]];
15684 int count = 0; nElem_Total = 0;
15685 for (
int ii = 0; ii < nElem_Recv[
size]; ii++) {
15686 if (!haloRecv[ii]) {
15688 for (
int jj = 0; jj < NODES_PER_ELEMENT; jj++) {
15689 Conn_Elem[count] = (int)connRecv[ii*NODES_PER_ELEMENT+jj] + 1;
15698 switch (Elem_Type) {
15700 nParallel_Line = nElem_Total;
15701 if (nParallel_Line > 0) Conn_BoundLine_Par = Conn_Elem;
15704 nParallel_BoundTria = nElem_Total;
15705 if (nParallel_BoundTria > 0) Conn_BoundTria_Par = Conn_Elem;
15708 nParallel_BoundQuad = nElem_Total;
15709 if (nParallel_BoundQuad > 0) Conn_BoundQuad_Par = Conn_Elem;
15718 delete [] connSend;
15719 delete [] connRecv;
15720 delete [] haloSend;
15721 delete [] haloRecv;
15722 delete [] Local_Halo;
15723 delete [] nElem_Recv;
15724 delete [] nElem_Send;
15725 delete [] nElem_Flag;
15726 delete [] Buffer_Recv_nAddedPeriodic;
15727 delete [] Buffer_Send_AddedPeriodic;
15728 delete [] Buffer_Recv_AddedPeriodic;
15729 delete [] npoint_procs;
15730 delete [] starting_node;
15731 delete [] ending_node;
15732 delete [] nPoint_Linear;
15738 unsigned short iMarker;
15739 unsigned long iProcessor;
15740 unsigned long iPoint, Global_Index, nLocalPoint, nTotalPoint, iVertex;
15742 int VARS_PER_POINT = nVar_Par;
15743 int *Local_Halo = NULL;
15757 Local_Halo =
new int[geometry->
GetnPoint()];
15758 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
15761 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
15767 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
15771 if (isPeriodic) Local_Halo[iPoint] =
false;
15779 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
15780 if (Local_Halo[iPoint] ==
false)
15787 nTotalPoint = nLocalPoint;
15795 unsigned long *npoint_procs =
new unsigned long[
size];
15796 unsigned long *starting_node =
new unsigned long[
size];
15797 unsigned long *ending_node =
new unsigned long[
size];
15798 unsigned long *nPoint_Linear =
new unsigned long[
size+1];
15800 unsigned long total_pt_accounted = 0;
15801 for (
int ii = 0; ii <
size; ii++) {
15802 npoint_procs[ii] = nTotalPoint/
size;
15803 total_pt_accounted = total_pt_accounted + npoint_procs[ii];
15808 unsigned long rem_points = nTotalPoint-total_pt_accounted;
15809 for (
unsigned long ii = 0; ii < rem_points; ii++) {
15810 npoint_procs[ii]++;
15815 starting_node[0] = 0;
15816 ending_node[0] = starting_node[0] + npoint_procs[0];
15817 nPoint_Linear[0] = 0;
15818 for (
int ii = 1; ii <
size; ii++) {
15819 starting_node[ii] = ending_node[ii-1];
15820 ending_node[ii] = starting_node[ii] + npoint_procs[ii];
15821 nPoint_Linear[ii] = nPoint_Linear[ii-1] + npoint_procs[ii-1];
15823 nPoint_Linear[
size] = nTotalPoint;
15832 int *nPoint_Send =
new int[
size+1]; nPoint_Send[0] = 0;
15833 int *nPoint_Recv =
new int[
size+1]; nPoint_Recv[0] = 0;
15834 int *nPoint_Flag =
new int[
size];
15836 for (
int ii=0; ii <
size; ii++) {
15837 nPoint_Send[ii] = 0;
15838 nPoint_Recv[ii] = 0;
15839 nPoint_Flag[ii]= -1;
15841 nPoint_Send[
size] = 0; nPoint_Recv[
size] = 0;
15843 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++ ) {
15847 if (!Local_Halo[iPoint]) {
15855 iProcessor = Global_Index/npoint_procs[0];
15856 if (iProcessor >= (
unsigned long)
size)
15857 iProcessor = (
unsigned long)
size-1;
15858 if (Global_Index >= nPoint_Linear[iProcessor])
15859 while(Global_Index >= nPoint_Linear[iProcessor+1]) iProcessor++;
15861 while(Global_Index < nPoint_Linear[iProcessor]) iProcessor--;
15866 if (nPoint_Flag[iProcessor] != (
int)iPoint) {
15867 nPoint_Flag[iProcessor] = (int)iPoint;
15868 nPoint_Send[iProcessor+1]++;
15882 nPoint_Recv[1] = nPoint_Send[1];
15890 int nSends = 0, nRecvs = 0;
15891 for (
int ii=0; ii <
size; ii++) nPoint_Flag[ii] = -1;
15893 for (
int ii = 0; ii <
size; ii++) {
15894 if ((ii !=
rank) && (nPoint_Send[ii+1] > 0)) nSends++;
15895 if ((ii !=
rank) && (nPoint_Recv[ii+1] > 0)) nRecvs++;
15897 nPoint_Send[ii+1] += nPoint_Send[ii];
15898 nPoint_Recv[ii+1] += nPoint_Recv[ii];
15905 connSend =
new su2double[VARS_PER_POINT*nPoint_Send[
size]];
15906 for (
int ii = 0; ii < VARS_PER_POINT*nPoint_Send[
size]; ii++)
15911 unsigned long *idSend =
new unsigned long[nPoint_Send[
size]];
15912 for (
int ii = 0; ii < nPoint_Send[
size]; ii++)
15918 unsigned long *index =
new unsigned long[
size];
15919 for (
int ii=0; ii <
size; ii++) index[ii] = VARS_PER_POINT*nPoint_Send[ii];
15921 unsigned long *idIndex =
new unsigned long[
size];
15922 for (
int ii=0; ii <
size; ii++) idIndex[ii] = nPoint_Send[ii];
15927 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
15931 if (!Local_Halo[iPoint]) {
15939 iProcessor = Global_Index/npoint_procs[0];
15940 if (iProcessor >= (
unsigned long)
size)
15941 iProcessor = (
unsigned long)
size-1;
15942 if (Global_Index >= nPoint_Linear[iProcessor])
15943 while(Global_Index >= nPoint_Linear[iProcessor+1]) iProcessor++;
15945 while(Global_Index < nPoint_Linear[iProcessor]) iProcessor--;
15949 if (nPoint_Flag[iProcessor] != (
int)iPoint) {
15951 nPoint_Flag[iProcessor] = (int)iPoint;
15952 unsigned long nn = index[iProcessor];
15956 for (
unsigned short kk = 0; kk < VARS_PER_POINT; kk++) {
15957 connSend[nn] = Local_Data[iPoint][kk]; nn++;
15963 nn = idIndex[iProcessor];
15964 idSend[nn] = Global_Index - starting_node[iProcessor];
15968 index[iProcessor] += VARS_PER_POINT;
15969 idIndex[iProcessor]++;
15986 connRecv =
new su2double[VARS_PER_POINT*nPoint_Recv[
size]];
15987 for (
int ii = 0; ii < VARS_PER_POINT*nPoint_Recv[
size]; ii++)
15990 unsigned long *idRecv =
new unsigned long[nPoint_Recv[
size]];
15991 for (
int ii = 0; ii < nPoint_Recv[
size]; ii++)
16001 unsigned long iMessage = 0;
16002 for (
int ii=0; ii<
size; ii++) {
16003 if ((ii !=
rank) && (nPoint_Recv[ii+1] > nPoint_Recv[ii])) {
16004 int ll = VARS_PER_POINT*nPoint_Recv[ii];
16005 int kk = nPoint_Recv[ii+1] - nPoint_Recv[ii];
16006 int count = VARS_PER_POINT*kk;
16018 for (
int ii=0; ii<
size; ii++) {
16019 if ((ii !=
rank) && (nPoint_Send[ii+1] > nPoint_Send[ii])) {
16020 int ll = VARS_PER_POINT*nPoint_Send[ii];
16021 int kk = nPoint_Send[ii+1] - nPoint_Send[ii];
16022 int count = VARS_PER_POINT*kk;
16024 int tag =
rank + 1;
16034 for (
int ii=0; ii<
size; ii++) {
16035 if ((ii !=
rank) && (nPoint_Recv[ii+1] > nPoint_Recv[ii])) {
16036 int ll = nPoint_Recv[ii];
16037 int kk = nPoint_Recv[ii+1] - nPoint_Recv[ii];
16050 for (
int ii=0; ii<
size; ii++) {
16051 if ((ii !=
rank) && (nPoint_Send[ii+1] > nPoint_Send[ii])) {
16052 int ll = nPoint_Send[ii];
16053 int kk = nPoint_Send[ii+1] - nPoint_Send[ii];
16056 int tag =
rank + 1;
16066 int mm = VARS_PER_POINT*nPoint_Recv[
rank];
16067 int ll = VARS_PER_POINT*nPoint_Send[
rank];
16068 int kk = VARS_PER_POINT*nPoint_Send[
rank+1];
16070 for (
int nn=ll; nn<kk; nn++, mm++) connRecv[mm] = connSend[nn];
16072 mm = nPoint_Recv[
rank];
16073 ll = nPoint_Send[
rank];
16074 kk = nPoint_Send[
rank+1];
16076 for (
int nn=ll; nn<kk; nn++, mm++) idRecv[mm] = idSend[nn];
16081 int number = 2*nSends;
16082 for (
int ii = 0; ii < number; ii++)
16086 for (
int ii = 0; ii < number; ii++)
16089 delete [] send_req;
16090 delete [] recv_req;
16097 Parallel_Data =
new su2double*[VARS_PER_POINT];
16098 for (
int jj = 0; jj < VARS_PER_POINT; jj++) {
16100 for (
int ii = 0; ii < nPoint_Recv[
size]; ii++) {
16101 Parallel_Data[jj][idRecv[ii]] = connRecv[ii*VARS_PER_POINT+jj];
16108 nParallel_Poin = nPoint_Recv[
size];
16113 nGlobal_Poin_Par = nParallel_Poin;
16121 delete [] connSend;
16122 delete [] connRecv;
16125 delete [] nPoint_Recv;
16126 delete [] nPoint_Send;
16127 delete [] nPoint_Flag;
16129 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
16130 delete [] Local_Data[iPoint];
16131 delete [] Local_Data;
16133 delete [] Local_Halo;
16134 delete [] npoint_procs;
16135 delete [] starting_node;
16136 delete [] ending_node;
16137 delete [] nPoint_Linear;
16143 unsigned short iMarker;
16144 unsigned long iProcessor;
16145 unsigned long iPoint, jPoint, kPoint, iElem;
16146 unsigned long Global_Index, nLocalPoint, nTotalPoint, iVertex;
16148 int VARS_PER_POINT = nVar_Par;
16149 int *Local_Halo = NULL;
16151 int SendRecv, RecvFrom;
16153 bool notPeriodic, notHalo, addedPeriodic, isPeriodic;
16178 Local_Halo =
new int[geometry->
GetnPoint()];
16179 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
16182 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
16188 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
16192 if (isPeriodic) Local_Halo[iPoint] =
false;
16200 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
16201 if (Local_Halo[iPoint] ==
false)
16208 nTotalPoint = nLocalPoint;
16216 unsigned long *npoint_procs =
new unsigned long[
size];
16217 unsigned long *starting_node =
new unsigned long[
size];
16218 unsigned long *ending_node =
new unsigned long[
size];
16220 unsigned long *nPoint_Linear_Nodes =
new unsigned long[
size+1];
16221 unsigned long *nPoint_Linear_Elems =
new unsigned long[
size+1];
16223 unsigned long total_pt_accounted = 0;
16224 for (
int ii = 0; ii <
size; ii++) {
16225 npoint_procs[ii] = nTotalPoint/
size;
16226 total_pt_accounted = total_pt_accounted + npoint_procs[ii];
16231 unsigned long rem_points = nTotalPoint-total_pt_accounted;
16232 for (
unsigned long ii = 0; ii < rem_points; ii++) {
16233 npoint_procs[ii]++;
16238 starting_node[0] = 0;
16239 ending_node[0] = starting_node[0] + npoint_procs[0];
16240 nPoint_Linear_Nodes[0] = 0;
16241 for (
int ii = 1; ii <
size; ii++) {
16242 starting_node[ii] = ending_node[ii-1];
16243 ending_node[ii] = starting_node[ii] + npoint_procs[ii];
16244 nPoint_Linear_Nodes[ii] = nPoint_Linear_Nodes[ii-1] + npoint_procs[ii-1];
16246 nPoint_Linear_Nodes[
size] = nTotalPoint;
16251 int *nElem_Send =
new int[
size+1]; nElem_Send[0] = 0;
16252 int *nElem_Recv =
new int[
size+1]; nElem_Recv[0] = 0;
16253 int *nElem_Flag =
new int[
size];
16255 for (
int ii=0; ii <
size; ii++) {
16256 nElem_Send[ii] = 0;
16257 nElem_Recv[ii] = 0;
16258 nElem_Flag[ii]= -1;
16260 nElem_Send[
size] = 0; nElem_Recv[
size] = 0;
16265 for (
int ii = 0; ii < (int)nParallel_Line; ii++) {
16271 Global_Index = Conn_BoundLine_Par[iNode]-1;
16275 iProcessor = Global_Index/npoint_procs[0];
16276 if (iProcessor >= (
unsigned long)
size)
16277 iProcessor = (
unsigned long)
size-1;
16278 if (Global_Index >= nPoint_Linear_Nodes[iProcessor])
16279 while(Global_Index >= nPoint_Linear_Nodes[iProcessor+1]) iProcessor++;
16281 while(Global_Index < nPoint_Linear_Nodes[iProcessor]) iProcessor--;
16286 if ((nElem_Flag[iProcessor] != iNode)) {
16287 nElem_Flag[iProcessor] = iNode;
16288 nElem_Send[iProcessor+1]++;
16297 for (
int ii=0; ii <
size; ii++) nElem_Flag[ii]= -1;
16299 for (
int ii = 0; ii < (int)nParallel_BoundTria; ii++) {
16305 Global_Index = Conn_BoundTria_Par[iNode]-1;
16309 iProcessor = Global_Index/npoint_procs[0];
16310 if (iProcessor >= (
unsigned long)
size)
16311 iProcessor = (
unsigned long)
size-1;
16312 if (Global_Index >= nPoint_Linear_Nodes[iProcessor])
16313 while(Global_Index >= nPoint_Linear_Nodes[iProcessor+1]) iProcessor++;
16315 while(Global_Index < nPoint_Linear_Nodes[iProcessor]) iProcessor--;
16320 if ((nElem_Flag[iProcessor] != iNode)) {
16321 nElem_Flag[iProcessor] = iNode;
16322 nElem_Send[iProcessor+1]++;
16331 for (
int ii=0; ii <
size; ii++) nElem_Flag[ii]= -1;
16333 for (
int ii = 0; ii < (int)nParallel_BoundQuad; ii++) {
16339 Global_Index = Conn_BoundQuad_Par[iNode]-1;
16343 iProcessor = Global_Index/npoint_procs[0];
16344 if (iProcessor >= (
unsigned long)
size)
16345 iProcessor = (
unsigned long)
size-1;
16346 if (Global_Index >= nPoint_Linear_Nodes[iProcessor])
16347 while(Global_Index >= nPoint_Linear_Nodes[iProcessor+1]) iProcessor++;
16349 while(Global_Index < nPoint_Linear_Nodes[iProcessor]) iProcessor--;
16354 if ((nElem_Flag[iProcessor] != iNode)) {
16355 nElem_Flag[iProcessor] = iNode;
16356 nElem_Send[iProcessor+1]++;
16370 nElem_Recv[1] = nElem_Send[1];
16378 int nSends = 0, nRecvs = 0;
16379 for (
int ii=0; ii <
size; ii++) nElem_Flag[ii] = -1;
16381 for (
int ii = 0; ii <
size; ii++) {
16382 if ((ii !=
rank) && (nElem_Send[ii+1] > 0)) nSends++;
16383 if ((ii !=
rank) && (nElem_Recv[ii+1] > 0)) nRecvs++;
16385 nElem_Send[ii+1] += nElem_Send[ii];
16386 nElem_Recv[ii+1] += nElem_Recv[ii];
16391 unsigned long *idSend =
new unsigned long[nElem_Send[
size]];
16392 for (
int ii = 0; ii < nElem_Send[
size]; ii++) idSend[ii] = 0;
16397 unsigned long *idIndex =
new unsigned long[
size];
16398 for (
int ii=0; ii <
size; ii++) idIndex[ii] = nElem_Send[ii];
16403 for (
int ii = 0; ii < (int)nParallel_Line; ii++) {
16409 Global_Index = Conn_BoundLine_Par[iNode]-1;
16413 iProcessor = Global_Index/npoint_procs[0];
16414 if (iProcessor >= (
unsigned long)
size)
16415 iProcessor = (
unsigned long)
size-1;
16416 if (Global_Index >= nPoint_Linear_Nodes[iProcessor])
16417 while(Global_Index >= nPoint_Linear_Nodes[iProcessor+1]) iProcessor++;
16419 while(Global_Index < nPoint_Linear_Nodes[iProcessor]) iProcessor--;
16423 if (nElem_Flag[iProcessor] != iNode) {
16425 nElem_Flag[iProcessor] = iNode;
16426 unsigned long nn = idIndex[iProcessor];
16430 idSend[nn] = Global_Index; nn++;
16434 idIndex[iProcessor]++;
16441 for (
int ii=0; ii <
size; ii++) nElem_Flag[ii]= -1;
16443 for (
int ii = 0; ii < (int)nParallel_BoundTria; ii++) {
16449 Global_Index = Conn_BoundTria_Par[iNode]-1;
16453 iProcessor = Global_Index/npoint_procs[0];
16454 if (iProcessor >= (
unsigned long)
size)
16455 iProcessor = (
unsigned long)
size-1;
16456 if (Global_Index >= nPoint_Linear_Nodes[iProcessor])
16457 while(Global_Index >= nPoint_Linear_Nodes[iProcessor+1]) iProcessor++;
16459 while(Global_Index < nPoint_Linear_Nodes[iProcessor]) iProcessor--;
16463 if (nElem_Flag[iProcessor] != iNode) {
16465 nElem_Flag[iProcessor] = iNode;
16466 unsigned long nn = idIndex[iProcessor];
16470 idSend[nn] = Global_Index; nn++;
16474 idIndex[iProcessor]++;
16481 for (
int ii=0; ii <
size; ii++) nElem_Flag[ii]= -1;
16483 for (
int ii = 0; ii < (int)nParallel_BoundQuad; ii++) {
16489 Global_Index = Conn_BoundQuad_Par[iNode]-1;
16493 iProcessor = Global_Index/npoint_procs[0];
16494 if (iProcessor >= (
unsigned long)
size)
16495 iProcessor = (
unsigned long)
size-1;
16496 if (Global_Index >= nPoint_Linear_Nodes[iProcessor])
16497 while(Global_Index >= nPoint_Linear_Nodes[iProcessor+1]) iProcessor++;
16499 while(Global_Index < nPoint_Linear_Nodes[iProcessor]) iProcessor--;
16503 if (nElem_Flag[iProcessor] != iNode) {
16505 nElem_Flag[iProcessor] = iNode;
16506 unsigned long nn = idIndex[iProcessor];
16510 idSend[nn] = Global_Index; nn++;
16514 idIndex[iProcessor]++;
16526 unsigned long *idRecv = NULL;
16527 idRecv =
new unsigned long[nElem_Recv[
size]];
16528 for (
int ii = 0; ii < nElem_Recv[
size]; ii++)
16540 unsigned long iMessage = 0;
16541 for (
int ii=0; ii<
size; ii++) {
16542 if ((ii !=
rank) && (nElem_Recv[ii+1] > nElem_Recv[ii])) {
16543 int ll = nElem_Recv[ii];
16544 int kk = nElem_Recv[ii+1] - nElem_Recv[ii];
16557 for (
int ii=0; ii<
size; ii++) {
16558 if ((ii !=
rank) && (nElem_Send[ii+1] > nElem_Send[ii])) {
16559 int ll = nElem_Send[ii];
16560 int kk = nElem_Send[ii+1] - nElem_Send[ii];
16563 int tag =
rank + 1;
16573 int mm = nElem_Recv[
rank];
16574 int ll = nElem_Send[
rank];
16575 int kk = nElem_Send[
rank+1];
16577 for (
int nn=ll; nn<kk; nn++, mm++) idRecv[mm] = idSend[nn];
16582 int number = nSends;
16583 for (
int ii = 0; ii < number; ii++)
16587 for (
int ii = 0; ii < number; ii++)
16590 delete [] send_req;
16591 delete [] recv_req;
16607 int *surfPoint =
new int[nParallel_Poin];
16608 for (iPoint = 0; iPoint < nParallel_Poin; iPoint++) surfPoint[iPoint] = -1;
16610 for (
int ii = 0; ii < nElem_Recv[
size]; ii++) {
16611 surfPoint[(int)idRecv[ii]- starting_node[
rank]] = (
int)idRecv[ii];
16616 nSurf_Poin_Par = 0;
16617 for (iPoint = 0; iPoint < nParallel_Poin; iPoint++) {
16618 if (surfPoint[iPoint] != -1) {
16627 int *nPoint_Send =
new int[
size+1]; nPoint_Send[0] = 0;
16628 int *nPoint_Recv =
new int[
size+1]; nPoint_Recv[0] = 0;
16630 for (
int ii=1; ii <
size+1; ii++) nPoint_Send[ii]= (
int)nSurf_Poin_Par;
16636 nPoint_Recv[1] = nPoint_Send[1];
16641 for (
int ii = 0; ii <
size; ii++) {
16642 nPoint_Send[ii+1] += nPoint_Send[ii];
16643 nPoint_Recv[ii+1] += nPoint_Recv[ii];
16650 Parallel_Surf_Data =
new su2double*[VARS_PER_POINT];
16651 for (
int jj = 0; jj < VARS_PER_POINT; jj++) {
16652 Parallel_Surf_Data[jj] =
new su2double[nSurf_Poin_Par];
16654 for (
int ii = 0; ii < (int)nParallel_Poin; ii++) {
16655 if (surfPoint[ii] !=-1) {
16656 Parallel_Surf_Data[jj][count] = Parallel_Data[jj][ii];
16666 nGlobal_Surf_Poin = nSurf_Poin_Par;
16677 unsigned long *globalP =
new unsigned long[nSurf_Poin_Par];
16678 unsigned long *renumbP =
new unsigned long[nSurf_Poin_Par];
16681 for (iPoint = 0; iPoint < nParallel_Poin; iPoint++) {
16682 if (surfPoint[iPoint] != -1) {
16683 globalP[count] = surfPoint[iPoint];
16684 renumbP[count] = count + nPoint_Recv[
rank];
16710 vector<unsigned long> Added_Periodic;
16711 Added_Periodic.clear();
16714 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
16717 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
16737 unsigned long nAddedPeriodic = 0, maxAddedPeriodic = 0;
16738 unsigned long Buffer_Send_nAddedPeriodic[1], *Buffer_Recv_nAddedPeriodic = NULL;
16739 Buffer_Recv_nAddedPeriodic =
new unsigned long[
size];
16741 nAddedPeriodic = Added_Periodic.size();
16742 Buffer_Send_nAddedPeriodic[0] = nAddedPeriodic;
16750 maxAddedPeriodic = nAddedPeriodic;
16751 Buffer_Recv_nAddedPeriodic[0] = Buffer_Send_nAddedPeriodic[0];
16755 unsigned long *Buffer_Send_AddedPeriodic =
new unsigned long[maxAddedPeriodic];
16756 unsigned long *Buffer_Recv_AddedPeriodic =
new unsigned long[
size*maxAddedPeriodic];
16758 for (iPoint = 0; iPoint < Added_Periodic.size(); iPoint++) {
16759 Buffer_Send_AddedPeriodic[iPoint] = Added_Periodic[iPoint];
16770 for (iPoint = 0; iPoint < maxAddedPeriodic; iPoint++)
16771 Buffer_Recv_AddedPeriodic[iPoint] = Buffer_Send_AddedPeriodic[iPoint];
16781 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
16784 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
16787 RecvFrom = abs(SendRecv)-1;
16789 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
16796 (SendRecv < 0) && (
rank > RecvFrom));
16808 notPeriodic = (isPeriodic && (SendRecv < 0));
16813 addedPeriodic =
false; kPoint = 0;
16814 for (iProcessor = 0; iProcessor < (
unsigned long)
size; iProcessor++) {
16815 for (jPoint = 0; jPoint < Buffer_Recv_nAddedPeriodic[iProcessor]; jPoint++) {
16816 if (Global_Index == Buffer_Recv_AddedPeriodic[kPoint+jPoint])
16817 addedPeriodic =
true;
16822 kPoint = (iProcessor+1)*maxAddedPeriodic;
16828 if ((notHalo || notPeriodic) && !addedPeriodic) {
16829 Local_Halo[iPoint] =
false;
16840 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
16841 if (Local_Halo[iPoint] ==
false)
16848 nTotalPoint = nLocalPoint;
16855 total_pt_accounted = 0;
16856 for (
int ii = 0; ii <
size; ii++) {
16857 npoint_procs[ii] = nTotalPoint/
size;
16858 total_pt_accounted = total_pt_accounted + npoint_procs[ii];
16863 rem_points = nTotalPoint-total_pt_accounted;
16864 for (
unsigned long ii = 0; ii < rem_points; ii++) {
16865 npoint_procs[ii]++;
16870 starting_node[0] = 0;
16871 ending_node[0] = starting_node[0] + npoint_procs[0];
16872 nPoint_Linear_Elems[0] = 0;
16873 for (
int ii = 1; ii <
size; ii++) {
16874 starting_node[ii] = ending_node[ii-1];
16875 ending_node[ii] = starting_node[ii] + npoint_procs[ii];
16876 nPoint_Linear_Elems[ii] = nPoint_Linear_Elems[ii-1] + npoint_procs[ii-1];
16878 nPoint_Linear_Elems[
size] = nTotalPoint;
16882 for (
int ii=0; ii <
size; ii++) {
16883 nElem_Send[ii] = 0;
16884 nElem_Recv[ii] = 0;
16885 nElem_Flag[ii]= -1;
16887 nElem_Send[
size] = 0; nElem_Recv[
size] = 0;
16892 for (
int ii = 0; ii < (int)nSurf_Poin_Par; ii++) {
16894 Global_Index = globalP[ii];
16898 iProcessor = Global_Index/npoint_procs[0];
16899 if (iProcessor >= (
unsigned long)
size)
16900 iProcessor = (
unsigned long)
size-1;
16901 if (Global_Index >= nPoint_Linear_Elems[iProcessor])
16902 while(Global_Index >= nPoint_Linear_Elems[iProcessor+1]) iProcessor++;
16904 while(Global_Index < nPoint_Linear_Elems[iProcessor]) iProcessor--;
16909 if ((nElem_Flag[iProcessor] != ii)) {
16910 nElem_Flag[iProcessor] = ii;
16911 nElem_Send[iProcessor+1]++;
16924 nElem_Recv[1] = nElem_Send[1];
16932 nSends = 0; nRecvs = 0;
16933 for (
int ii=0; ii <
size; ii++) nElem_Flag[ii] = -1;
16935 for (
int ii = 0; ii <
size; ii++) {
16936 if ((ii !=
rank) && (nElem_Send[ii+1] > 0)) nSends++;
16937 if ((ii !=
rank) && (nElem_Recv[ii+1] > 0)) nRecvs++;
16939 nElem_Send[ii+1] += nElem_Send[ii];
16940 nElem_Recv[ii+1] += nElem_Recv[ii];
16946 unsigned long *globalSend = NULL;
16947 globalSend =
new unsigned long[nElem_Send[
size]];
16948 for (
int ii = 0; ii < nElem_Send[
size]; ii++)
16949 globalSend[ii] = 0;
16954 unsigned long *renumbSend = NULL;
16955 renumbSend =
new unsigned long[nElem_Send[
size]];
16956 for (
int ii = 0; ii < nElem_Send[
size]; ii++)
16957 renumbSend[ii] = 0;
16962 unsigned long *index =
new unsigned long[
size];
16963 for (
int ii=0; ii <
size; ii++) index[ii] = nElem_Send[ii];
16968 for (
int ii = 0; ii < (int)nSurf_Poin_Par; ii++) {
16970 Global_Index = globalP[ii];
16974 iProcessor = Global_Index/npoint_procs[0];
16975 if (iProcessor >= (
unsigned long)
size)
16976 iProcessor = (
unsigned long)
size-1;
16977 if (Global_Index >= nPoint_Linear_Elems[iProcessor])
16978 while(Global_Index >= nPoint_Linear_Elems[iProcessor+1]) iProcessor++;
16980 while(Global_Index < nPoint_Linear_Elems[iProcessor]) iProcessor--;
16983 if (nElem_Flag[iProcessor] != ii) {
16985 nElem_Flag[iProcessor] = ii;
16986 unsigned long nn = index[iProcessor];
16988 globalSend[nn] = Global_Index;
16989 renumbSend[nn] = renumbP[ii];
16993 index[iProcessor]++;
17007 unsigned long *globalRecv = NULL;
17008 globalRecv =
new unsigned long[nElem_Recv[
size]];
17009 for (
int ii = 0; ii < nElem_Recv[
size]; ii++)
17010 globalRecv[ii] = 0;
17012 unsigned long *renumbRecv = NULL;
17013 renumbRecv =
new unsigned long[nElem_Recv[
size]];
17014 for (
int ii = 0; ii < nElem_Recv[
size]; ii++)
17015 renumbRecv[ii] = 0;
17027 for (
int ii=0; ii<
size; ii++) {
17028 if ((ii !=
rank) && (nElem_Recv[ii+1] > nElem_Recv[ii])) {
17029 int ll = nElem_Recv[ii];
17030 int kk = nElem_Recv[ii+1] - nElem_Recv[ii];
17043 for (
int ii=0; ii<
size; ii++) {
17044 if ((ii !=
rank) && (nElem_Send[ii+1] > nElem_Send[ii])) {
17045 int ll = nElem_Send[ii];
17046 int kk = nElem_Send[ii+1] - nElem_Send[ii];
17049 int tag =
rank + 1;
17059 for (
int ii=0; ii<
size; ii++) {
17060 if ((ii !=
rank) && (nElem_Recv[ii+1] > nElem_Recv[ii])) {
17061 int ll = nElem_Recv[ii];
17062 int kk = nElem_Recv[ii+1] - nElem_Recv[ii];
17075 for (
int ii=0; ii<
size; ii++) {
17076 if ((ii !=
rank) && (nElem_Send[ii+1] > nElem_Send[ii])) {
17077 int ll = nElem_Send[ii];
17078 int kk = nElem_Send[ii+1] - nElem_Send[ii];
17081 int tag =
rank + 1;
17092 mm = nElem_Recv[
rank];
17093 ll = nElem_Send[
rank];
17094 kk = nElem_Send[
rank+1];
17096 for (
int nn=ll; nn<kk; nn++, mm++) globalRecv[mm] = globalSend[nn];
17098 mm = nElem_Recv[
rank];
17099 ll = nElem_Send[
rank];
17100 kk = nElem_Send[
rank+1];
17102 for (
int nn=ll; nn<kk; nn++, mm++) renumbRecv[mm] = renumbSend[nn];
17108 for (
int ii = 0; ii < number; ii++)
17112 for (
int ii = 0; ii < number; ii++)
17115 delete [] send_req;
17116 delete [] recv_req;
17123 map<unsigned long,unsigned long> Global2Renumber;
17124 for (
int ii = 0; ii < nElem_Recv[
size]; ii++) {
17125 Global2Renumber[globalRecv[ii]] = renumbRecv[ii] + 1;
17136 vector<unsigned long>::iterator it;
17137 vector<unsigned long> outliers;
17139 for (
int ii = 0; ii < (int)nParallel_Line; ii++) {
17143 Global_Index = Conn_BoundLine_Par[iNode]-1;
17147 iProcessor = Global_Index/npoint_procs[0];
17148 if (iProcessor >= (
unsigned long)
size)
17149 iProcessor = (
unsigned long)
size-1;
17150 if (Global_Index >= nPoint_Linear_Elems[iProcessor])
17151 while(Global_Index >= nPoint_Linear_Elems[iProcessor+1]) iProcessor++;
17153 while(Global_Index < nPoint_Linear_Elems[iProcessor]) iProcessor--;
17157 if ((iProcessor != (
unsigned long)
rank)) {
17158 outliers.push_back(Global_Index);
17164 for (
int ii=0; ii <
size; ii++) nElem_Flag[ii]= -1;
17166 for (
int ii = 0; ii < (int)nParallel_BoundTria; ii++) {
17170 Global_Index = Conn_BoundTria_Par[iNode]-1;
17174 iProcessor = Global_Index/npoint_procs[0];
17175 if (iProcessor >= (
unsigned long)
size)
17176 iProcessor = (
unsigned long)
size-1;
17177 if (Global_Index >= nPoint_Linear_Elems[iProcessor])
17178 while(Global_Index >= nPoint_Linear_Elems[iProcessor+1]) iProcessor++;
17180 while(Global_Index < nPoint_Linear_Elems[iProcessor]) iProcessor--;
17184 if ((iProcessor != (
unsigned long)
rank)) {
17185 outliers.push_back(Global_Index);
17191 for (
int ii=0; ii <
size; ii++) nElem_Flag[ii]= -1;
17193 for (
int ii = 0; ii < (int)nParallel_BoundQuad; ii++) {
17197 Global_Index = Conn_BoundQuad_Par[iNode]-1;
17201 iProcessor = Global_Index/npoint_procs[0];
17202 if (iProcessor >= (
unsigned long)
size)
17203 iProcessor = (
unsigned long)
size-1;
17204 if (Global_Index >= nPoint_Linear_Elems[iProcessor])
17205 while(Global_Index >= nPoint_Linear_Elems[iProcessor+1]) iProcessor++;
17207 while(Global_Index < nPoint_Linear_Elems[iProcessor]) iProcessor--;
17211 if ((iProcessor != (
unsigned long)
rank)) {
17212 outliers.push_back(Global_Index);
17221 sort(outliers.begin(), outliers.end());
17222 it = unique(outliers.begin(), outliers.end());
17223 outliers.resize(it - outliers.begin());
17229 for (
int ii=0; ii <
size; ii++) {
17230 nElem_Send[ii] = 0;
17231 nElem_Recv[ii] = 0;
17232 nElem_Flag[ii]= -1;
17234 nElem_Send[
size] = 0; nElem_Recv[
size] = 0;
17236 for (
int ii = 0; ii < (int)outliers.size(); ii++) {
17238 Global_Index = outliers[ii];
17242 iProcessor = Global_Index/npoint_procs[0];
17243 if (iProcessor >= (
unsigned long)
size)
17244 iProcessor = (
unsigned long)
size-1;
17245 if (Global_Index >= nPoint_Linear_Nodes[iProcessor])
17246 while(Global_Index >= nPoint_Linear_Nodes[iProcessor+1]) iProcessor++;
17248 while(Global_Index < nPoint_Linear_Nodes[iProcessor]) iProcessor--;
17253 if ((nElem_Flag[iProcessor] != ii)) {
17254 nElem_Flag[iProcessor] = ii;
17255 nElem_Send[iProcessor+1]++;
17268 nElem_Recv[1] = nElem_Send[1];
17276 nSends = 0; nRecvs = 0;
17277 for (
int ii=0; ii <
size; ii++) nElem_Flag[ii] = -1;
17279 for (
int ii = 0; ii <
size; ii++) {
17280 if ((ii !=
rank) && (nElem_Send[ii+1] > 0)) nSends++;
17281 if ((ii !=
rank) && (nElem_Recv[ii+1] > 0)) nRecvs++;
17283 nElem_Send[ii+1] += nElem_Send[ii];
17284 nElem_Recv[ii+1] += nElem_Recv[ii];
17288 idSend =
new unsigned long[nElem_Send[
size]];
17289 for (
int ii = 0; ii < nElem_Send[
size]; ii++)
17294 for (
int ii=0; ii <
size; ii++) idIndex[ii] = nElem_Send[ii];
17298 for (
int ii = 0; ii < (int)outliers.size(); ii++) {
17300 Global_Index = outliers[ii];
17304 iProcessor = Global_Index/npoint_procs[0];
17305 if (iProcessor >= (
unsigned long)
size)
17306 iProcessor = (
unsigned long)
size-1;
17307 if (Global_Index >= nPoint_Linear_Nodes[iProcessor])
17308 while(Global_Index >= nPoint_Linear_Nodes[iProcessor+1]) iProcessor++;
17310 while(Global_Index < nPoint_Linear_Nodes[iProcessor]) iProcessor--;
17315 if ((nElem_Flag[iProcessor] != ii)) {
17317 nElem_Flag[iProcessor] = ii;
17318 unsigned long nn = idIndex[iProcessor];
17322 idSend[nn] = Global_Index; nn++;
17326 idIndex[iProcessor]++;
17337 idRecv =
new unsigned long[nElem_Recv[
size]];
17338 for (
int ii = 0; ii < nElem_Recv[
size]; ii++)
17351 for (
int ii=0; ii<
size; ii++) {
17352 if ((ii !=
rank) && (nElem_Recv[ii+1] > nElem_Recv[ii])) {
17353 int ll = nElem_Recv[ii];
17354 int kk = nElem_Recv[ii+1] - nElem_Recv[ii];
17367 for (
int ii=0; ii<
size; ii++) {
17368 if ((ii !=
rank) && (nElem_Send[ii+1] > nElem_Send[ii])) {
17369 int ll = nElem_Send[ii];
17370 int kk = nElem_Send[ii+1] - nElem_Send[ii];
17373 int tag =
rank + 1;
17383 mm = nElem_Recv[
rank];
17384 ll = nElem_Send[
rank];
17385 kk = nElem_Send[
rank+1];
17387 for (
int nn=ll; nn<kk; nn++, mm++) idRecv[mm] = idSend[nn];
17393 for (
int ii = 0; ii < number; ii++)
17397 for (
int ii = 0; ii < number; ii++)
17400 delete [] send_req;
17401 delete [] recv_req;
17407 for (
int ii = 0; ii < nElem_Recv[
size]; ii++) {
17408 for (iPoint = 0; iPoint < nSurf_Poin_Par; iPoint++) {
17409 if (idRecv[ii] == globalP[iPoint]) {
17410 idRecv[ii] = renumbP[iPoint];
17428 for (
int ii=0; ii<
size; ii++) {
17429 if ((ii !=
rank) && (nElem_Send[ii+1] > nElem_Send[ii])) {
17430 int ll = nElem_Send[ii];
17431 int kk = nElem_Send[ii+1] - nElem_Send[ii];
17444 for (
int ii=0; ii<
size; ii++) {
17445 if ((ii !=
rank) && (nElem_Recv[ii+1] > nElem_Recv[ii])) {
17446 int ll = nElem_Recv[ii];
17447 int kk = nElem_Recv[ii+1] - nElem_Recv[ii];
17450 int tag =
rank + 1;
17460 mm = nElem_Send[
rank];
17461 ll = nElem_Recv[
rank];
17462 kk = nElem_Recv[
rank+1];
17464 for (
int nn=ll; nn<kk; nn++, mm++) idSend[mm] = idRecv[nn];
17470 for (
int ii = 0; ii < number; ii++)
17474 for (
int ii = 0; ii < number; ii++)
17477 delete [] send_req;
17478 delete [] recv_req;
17485 for (
int ii = 0; ii < nElem_Send[
size]; ii++) {
17486 Global2Renumber[outliers[ii]] = idSend[ii] + 1;
17493 for (iElem = 0; iElem < nParallel_Line; iElem++) {
17495 Conn_BoundLine_Par[iNode+0] = (int)Global2Renumber[Conn_BoundLine_Par[iNode+0]-1];
17496 Conn_BoundLine_Par[iNode+1] = (int)Global2Renumber[Conn_BoundLine_Par[iNode+1]-1];
17499 for (iElem = 0; iElem < nParallel_BoundTria; iElem++) {
17501 Conn_BoundTria_Par[iNode+0] = (int)Global2Renumber[Conn_BoundTria_Par[iNode+0]-1];
17502 Conn_BoundTria_Par[iNode+1] = (int)Global2Renumber[Conn_BoundTria_Par[iNode+1]-1];
17503 Conn_BoundTria_Par[iNode+2] = (int)Global2Renumber[Conn_BoundTria_Par[iNode+2]-1];
17506 for (iElem = 0; iElem < nParallel_BoundQuad; iElem++) {
17508 Conn_BoundQuad_Par[iNode+0] = (int)Global2Renumber[Conn_BoundQuad_Par[iNode+0]-1];
17509 Conn_BoundQuad_Par[iNode+1] = (int)Global2Renumber[Conn_BoundQuad_Par[iNode+1]-1];
17510 Conn_BoundQuad_Par[iNode+2] = (int)Global2Renumber[Conn_BoundQuad_Par[iNode+2]-1];
17511 Conn_BoundQuad_Par[iNode+3] = (int)Global2Renumber[Conn_BoundQuad_Par[iNode+3]-1];
17517 delete [] surfPoint;
17523 delete [] globalSend;
17524 delete [] globalRecv;
17525 delete [] renumbSend;
17526 delete [] renumbRecv;
17527 delete [] nElem_Recv;
17528 delete [] nElem_Send;
17529 delete [] nElem_Flag;
17530 delete [] Local_Halo;
17531 delete [] Buffer_Recv_nAddedPeriodic;
17532 delete [] Buffer_Send_AddedPeriodic;
17533 delete [] Buffer_Recv_AddedPeriodic;
17534 delete [] npoint_procs;
17535 delete [] starting_node;
17536 delete [] ending_node;
17537 delete [] nPoint_Linear_Elems;
17538 delete [] nPoint_Linear_Nodes;
17539 delete [] nPoint_Send;
17540 delete [] nPoint_Recv;
17549 unsigned short iVar;
17550 unsigned long iPoint, iExtIter = config->
GetExtIter();
17557 ofstream restart_file;
17569 }
else if (disc_adj_fem){
17588 }
else if ((fem || disc_adj_fem) && (config->
GetWrt_Dynamic())) {
17595 restart_file.open(filename.c_str(), ios::out);
17596 restart_file.precision(15);
17597 restart_file <<
"\"PointID\"";
17598 for (iVar = 0; iVar < Variable_Names.size()-1; iVar++)
17599 restart_file <<
"\t\"" << Variable_Names[iVar] <<
"\"";
17600 restart_file <<
"\t\"" << Variable_Names[Variable_Names.size()-1] <<
"\"" << endl;
17601 restart_file.close();
17610 restart_file.open(filename.c_str(), ios::out | ios::app);
17611 restart_file.precision(15);
17615 unsigned long myPoint = 0, offset = 0, Global_Index;
17616 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
17617 if (
rank == iProcessor) {
17618 for (iPoint = 0; iPoint < nParallel_Poin; iPoint++) {
17622 Global_Index = iPoint + offset;
17627 if (Global_Index < nPoint_Restart) {
17631 restart_file << Global_Index <<
"\t";
17636 for (iVar = 0; iVar < nVar_Par; iVar++) {
17637 restart_file << scientific << Parallel_Data[iVar][iPoint] <<
"\t";
17639 restart_file <<
"\n";
17644 restart_file.flush();
17656 restart_file <<
"EXT_ITER= " << config->
GetExtIter() + 1 << endl;
17662 restart_file <<
"DCD_DCL_VALUE= " << config->
GetdCD_dCL() << endl;
17663 restart_file <<
"DCMX_DCL_VALUE= " << config->
GetdCMx_dCL() << endl;
17664 restart_file <<
"DCMY_DCL_VALUE= " << config->
GetdCMy_dCL() << endl;
17665 restart_file <<
"DCMZ_DCL_VALUE= " << config->
GetdCMz_dCL() << endl;
17671 restart_file.close();
17680 unsigned long iPoint, iExtIter = config->
GetExtIter();
17687 ofstream restart_file;
17690 su2double file_size = 0.0, StartTime, StopTime, UsedTime, Bandwidth;
17720 strcpy(fname, filename.c_str());
17728 int var_buf_size = 5;
17729 int var_buf[5] = {535532, nVar_Par, (int)nGlobalPoint_Sort, 1, 8};
17738 for (iPoint = 0; iPoint < nParallel_Poin; iPoint++)
17739 for (iVar = 0; iVar < nVar_Par; iVar++)
17744 int Restart_ExtIter;
17746 Restart_ExtIter= (int)config->
GetExtIter() + 1;
17768 StartTime = MPI_Wtime();
17774 fhw = fopen(fname,
"wb");
17784 fwrite(var_buf, var_buf_size,
sizeof(
int), fhw);
17785 file_size += (
su2double)var_buf_size*
sizeof(
int);
17791 for (iVar = 0; iVar < nVar_Par; iVar++) {
17799 fwrite(buf, nVar_Par*nParallel_Poin,
sizeof(
passivedouble), fhw);
17804 fwrite(&Restart_ExtIter, 1,
sizeof(
int), fhw);
17822 MPI_Datatype etype, filetype;
17833 MPI_Type_contiguous(nVar_Par*nParallel_Poin,
MPI_DOUBLE, &filetype);
17834 MPI_Type_commit(&filetype);
17842 MPI_MODE_CREATE|MPI_MODE_EXCL|MPI_MODE_WRONLY,
17843 MPI_INFO_NULL, &fhw);
17844 if (ierr != MPI_SUCCESS) {
17845 MPI_File_close(&fhw);
17847 MPI_File_delete(fname, MPI_INFO_NULL);
17849 MPI_MODE_CREATE|MPI_MODE_EXCL|MPI_MODE_WRONLY,
17850 MPI_INFO_NULL, &fhw);
17865 file_size += (
su2double)var_buf_size*
sizeof(
int);
17871 for (iVar = 0; iVar < nVar_Par; iVar++) {
17873 strcpy(str_buf, Variable_Names[iVar].c_str());
17883 disp = (var_buf_size*
sizeof(int) + nVar_Par*
CGNS_STRING_SIZE*
sizeof(
char) +
17889 MPI_File_set_view(fhw, disp, etype, filetype, (
char*)
"native", MPI_INFO_NULL);
17893 MPI_File_write_all(fhw, buf, nVar_Par*nParallel_Poin,
MPI_DOUBLE, &status);
17898 MPI_Type_free(&filetype);
17902 MPI_File_set_view(fhw, 0, MPI_BYTE, MPI_BYTE, (
char*)
"native", MPI_INFO_NULL);
17910 disp = (var_buf_size*
sizeof(int) + nVar_Par*
CGNS_STRING_SIZE*
sizeof(
char) +
17917 disp = (var_buf_size*
sizeof(int) + nVar_Par*
CGNS_STRING_SIZE*
sizeof(
char) +
17918 nVar_Par*nGlobalPoint_Sort*
sizeof(
passivedouble) + 1*
sizeof(
int));
17926 MPI_File_close(&fhw);
17935 StopTime = MPI_Wtime();
17937 UsedTime = StopTime-StartTime;
17949 Bandwidth = file_size/(1.0e6)/UsedTime;
17953 cout <<
"Wrote " << file_size/1.0e6 <<
" MB to disk in ";
17954 cout << UsedTime <<
" s. (" << Bandwidth <<
" MB/s)." << endl;
17964 CSolver *FlowSolver,
unsigned long iExtIter,
17965 unsigned short val_iZone,
unsigned short val_direction) {
17973 int DIRECTION = (int)val_direction;
17979 unsigned short iVar;
17980 unsigned long iPoint, iVertex, Global_Index;
17991 int *Local_Halo =
new int[geometry->
GetnPoint()];
17992 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
17995 for (
unsigned short iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
18001 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
18005 if (isPeriodic) Local_Halo[iPoint] =
false;
18012 unsigned long nTotalPoint;
18013 unsigned long nLocalPoint = 0;
18014 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
18015 if (Local_Halo[iPoint] ==
false)
18022 nTotalPoint = nLocalPoint;
18025 unsigned long *npoint_procs =
new unsigned long[nProcessor];
18026 unsigned long *nPoint_Linear =
new unsigned long[nProcessor+1];
18028 unsigned long total_pt_accounted = 0;
18029 for (
int ii = 0; ii < nProcessor; ii++) {
18030 npoint_procs[ii] = nTotalPoint/nProcessor;
18031 total_pt_accounted = total_pt_accounted + npoint_procs[ii];
18036 unsigned long rem_points = nTotalPoint-total_pt_accounted;
18037 for (
unsigned long ii = 0; ii < rem_points; ii++) {
18038 npoint_procs[ii]++;
18043 nPoint_Linear[0] = 0;
18044 for (
int ii = 1; ii < nProcessor; ii++) {
18045 nPoint_Linear[ii] = nPoint_Linear[ii-1] + npoint_procs[ii-1];
18047 nPoint_Linear[nProcessor] = nTotalPoint;
18049 unsigned long Buffer_Send_nVertex[1], *Buffer_Recv_nVertex = NULL;
18050 unsigned long nLocalVertex_Surface = 0;
18051 unsigned long MaxLocalVertex_Surface = 0;
18057 nLocalVertex_Surface = 0;
18058 for (iPoint = 0; iPoint < nParallel_Poin; iPoint++) {
18062 Global_Index = iPoint + nPoint_Linear[
rank];
18067 if (Global_Index < geometry->GetGlobal_nPointDomain()) {
18068 if ((Parallel_Data[DIRECTION][iPoint] > coordMin) &&
18069 (Parallel_Data[DIRECTION][iPoint] < coordMax)) {
18070 nLocalVertex_Surface++;
18078 Buffer_Send_nVertex[0] = nLocalVertex_Surface;
18079 if (
rank ==
MASTER_NODE) Buffer_Recv_nVertex =
new unsigned long [nProcessor];
18085 MaxLocalVertex_Surface = nLocalVertex_Surface;
18086 Buffer_Recv_nVertex[0] = Buffer_Send_nVertex[0];
18094 unsigned long *Buffer_Send_GlobalIndex =
new unsigned long [MaxLocalVertex_Surface];
18095 unsigned long *Buffer_Recv_GlobalIndex = NULL;
18100 Buffer_Recv_Data =
new su2double [nProcessor*MaxLocalVertex_Surface*nVar_Par];
18101 Buffer_Recv_GlobalIndex =
new unsigned long [nProcessor*MaxLocalVertex_Surface];
18108 nLocalVertex_Surface = 0;
18109 for (iPoint = 0; iPoint < nParallel_Poin; iPoint++) {
18113 Global_Index = iPoint + nPoint_Linear[
rank];
18118 if (Global_Index < geometry->GetGlobal_nPointDomain()) {
18119 if ((Parallel_Data[DIRECTION][iPoint] > coordMin) &&
18120 (Parallel_Data[DIRECTION][iPoint] < coordMax)) {
18121 Buffer_Send_GlobalIndex[nLocalVertex_Surface] = Global_Index;
18122 for (iVar = 0; iVar < nVar_Par; iVar++) {
18123 Buffer_Send_Data[nLocalVertex_Surface*nVar_Par+iVar] = Parallel_Data[iVar][iPoint];
18125 nLocalVertex_Surface++;
18136 for (iVertex = 0; iVertex < Buffer_Recv_nVertex[0]; iVertex++) {
18137 Buffer_Recv_GlobalIndex[iVertex] = Buffer_Send_GlobalIndex[iVertex];
18138 for (iVar = 0; iVar < nVar_Par; iVar++) {
18139 Buffer_Recv_Data[iVertex*nVar_Par+iVar] = Buffer_Send_Data[iVertex*nVar_Par+iVar];
18150 string filename =
"slice";
18151 if (DIRECTION == 0) {
18152 SPRINTF (buffer,
"_vert.csv");
18153 }
else if (DIRECTION == 1) {
18154 SPRINTF (buffer,
"_hori.csv");
18156 ofstream SurfFlow_file;
18159 strcpy (cstr, filename.c_str());
18160 strcat (cstr, buffer);
18161 SurfFlow_file.precision(15);
18162 SurfFlow_file.open(cstr, ios::out);
18166 SurfFlow_file <<
"\"Global_Index\",";
18167 for (iVar = 0; iVar < Variable_Names.size()-1; iVar++) {
18168 SurfFlow_file <<
"\"" << Variable_Names[iVar] <<
"\",";
18170 SurfFlow_file <<
"\"" << Variable_Names[Variable_Names.size()-1] <<
"\"" << endl;
18174 unsigned long Total_Index;
18175 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
18176 for (iVertex = 0; iVertex < Buffer_Recv_nVertex[iProcessor]; iVertex++) {
18180 Total_Index = iProcessor*MaxLocalVertex_Surface+iVertex;
18181 Global_Index = Buffer_Recv_GlobalIndex[Total_Index];
18185 SurfFlow_file << scientific << Global_Index;
18186 Total_Index = iProcessor*MaxLocalVertex_Surface*nVar_Par+iVertex*nVar_Par;
18187 for (iVar = 0; iVar < nVar_Par; iVar++) {
18188 SurfFlow_file << scientific <<
", " << Buffer_Recv_Data[Total_Index+iVar];
18190 SurfFlow_file << endl;
18197 SurfFlow_file.close();
18201 delete [] Buffer_Recv_Data;
18202 delete [] Buffer_Recv_GlobalIndex;
18203 delete [] Buffer_Recv_nVertex;
18209 delete [] Buffer_Send_Data;
18210 delete [] Buffer_Send_GlobalIndex;
18219 if (nParallel_Line > 0 && Conn_BoundLine_Par != NULL)
18220 delete [] Conn_BoundLine_Par;
18221 if (nParallel_BoundTria > 0 && Conn_BoundTria_Par != NULL)
18222 delete [] Conn_BoundTria_Par;
18223 if (nParallel_BoundQuad > 0 && Conn_BoundQuad_Par != NULL)
18224 delete [] Conn_BoundQuad_Par;
18227 if (nParallel_Tria > 0 && Conn_Tria_Par != NULL)
delete [] Conn_Tria_Par;
18228 if (nParallel_Quad > 0 && Conn_Quad_Par != NULL)
delete [] Conn_Quad_Par;
18229 if (nParallel_Tetr > 0 && Conn_Tetr_Par != NULL)
delete [] Conn_Tetr_Par;
18230 if (nParallel_Hexa > 0 && Conn_Hexa_Par != NULL)
delete [] Conn_Hexa_Par;
18231 if (nParallel_Pris > 0 && Conn_Pris_Par != NULL)
delete [] Conn_Pris_Par;
18232 if (nParallel_Pyra > 0 && Conn_Pyra_Par != NULL)
delete [] Conn_Pyra_Par;
18241 for (
unsigned short iVar = 0; iVar < nVar_Par; iVar++) {
18242 if (Parallel_Data[iVar] != NULL)
delete [] Parallel_Data[iVar];
18244 if (Parallel_Data != NULL)
delete [] Parallel_Data;
18248 if (Local_Halo_Sort != NULL)
delete [] Local_Halo_Sort;
18250 if (beg_node != NULL)
delete [] beg_node;
18251 if (end_node != NULL)
delete [] end_node;
18253 if (nPoint_Lin != NULL)
delete [] nPoint_Lin;
18254 if (nPoint_Cum != NULL)
delete [] nPoint_Cum;
18262 for (
unsigned short iVar = 0; iVar < nVar_Par; iVar++) {
18263 if (Parallel_Surf_Data[iVar] != NULL)
delete [] Parallel_Surf_Data[iVar];
18265 if (Parallel_Surf_Data != NULL)
delete [] Parallel_Surf_Data;
18273 unsigned short iDim, nDim = geometry->
GetnDim();
18274 unsigned long iPoint, jPoint, kPoint;
18276 int iProcessor, nProcessor =
size;
18278 unsigned long iVertex, iMarker;
18279 unsigned long Buffer_Send_nPoin[1], *Buffer_Recv_nPoin = NULL;
18280 unsigned long nLocalPoint = 0, MaxLocalPoint = 0;
18282 unsigned long index, iChar;
18285 vector<string> Marker_Tags;
18286 vector<string>::iterator it;
18288 unsigned long *nRowCum_Counter = NULL;
18290 if (
rank ==
MASTER_NODE) Buffer_Recv_nPoin =
new unsigned long[nProcessor];
18296 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
18298 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
18309 Buffer_Send_nPoin[0] = nLocalPoint;
18318 Buffer_Recv_nPoin[0] = Buffer_Send_nPoin[0];
18319 MaxLocalPoint = nLocalPoint;
18330 su2double *Buffer_Send_Z = NULL, *Buffer_Recv_Z = NULL;
18331 if (nDim == 3) Buffer_Send_Z =
new su2double[MaxLocalPoint];
18334 char *Buffer_Recv_Str = NULL;
18340 Buffer_Recv_X =
new su2double[nProcessor*MaxLocalPoint];
18341 Buffer_Recv_Y =
new su2double[nProcessor*MaxLocalPoint];
18342 if (nDim == 3) Buffer_Recv_Z =
new su2double[nProcessor*MaxLocalPoint];
18343 Buffer_Recv_Str =
new char[nProcessor*MaxLocalPoint*
MAX_STRING_SIZE];
18347 unsigned long nGlobal_InletPoint = 0;
18348 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
18349 nGlobal_InletPoint += Buffer_Recv_nPoin[iProcessor];
18352 for (iDim = 0; iDim < nDim; iDim++) {
18353 InletCoords[iDim] =
new su2double[nGlobal_InletPoint];
18365 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
18368 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
18381 Buffer_Send_X[jPoint] = Coords_Local[0];
18382 Buffer_Send_Y[jPoint] = Coords_Local[1];
18383 if (nDim == 3) Buffer_Send_Z[jPoint] = Coords_Local[2];
18388 Buffer_Send_X[jPoint] *= 12.0;
18389 Buffer_Send_Y[jPoint] *= 12.0;
18390 if (nDim == 3) Buffer_Send_Z[jPoint] *= 12.0;
18418 for (iPoint = 0; iPoint < MaxLocalPoint; iPoint++) {
18419 Buffer_Recv_X[iPoint] = Buffer_Send_X[iPoint];
18420 Buffer_Recv_Y[iPoint] = Buffer_Send_Y[iPoint];
18421 if (nDim == 3) Buffer_Recv_Z[iPoint] = Buffer_Send_Z[iPoint];
18424 Buffer_Recv_Str[index + iChar] = Buffer_Send_Str[index + iChar];
18433 Marker_Tags_InletFile.clear();
18438 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
18439 for (iPoint = 0; iPoint < Buffer_Recv_nPoin[iProcessor]; iPoint++) {
18442 str_buf[iChar] = Buffer_Recv_Str[index + iChar];
18444 Marker_Tags.push_back(str_buf);
18445 Marker_Tags_InletFile.push_back(str_buf);
18451 sort(Marker_Tags_InletFile.begin(), Marker_Tags_InletFile.end());
18452 Marker_Tags_InletFile.erase(unique(Marker_Tags_InletFile.begin(),
18453 Marker_Tags_InletFile.end()),
18454 Marker_Tags_InletFile.end());
18458 nMarker_InletFile = Marker_Tags_InletFile.size();
18462 nRow_InletFile =
new unsigned long[nMarker_InletFile];
18463 for (iMarker = 0; iMarker < nMarker_InletFile; iMarker++) {
18464 nRow_InletFile[iMarker] = 0;
18470 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
18471 for (iPoint = 0; iPoint < Buffer_Recv_nPoin[iProcessor]; iPoint++) {
18472 for (iMarker = 0; iMarker < nMarker_InletFile; iMarker++) {
18473 if (Marker_Tags_InletFile[iMarker] == Marker_Tags[jPoint]) {
18474 nRow_InletFile[iMarker]++;
18484 nRowCum_InletFile =
new unsigned long[nMarker_InletFile+1];
18485 nRowCum_Counter =
new unsigned long[nMarker_InletFile+1];
18487 nRowCum_InletFile[0] = 0; nRowCum_Counter[0] = 0;
18488 for (iMarker = 0; iMarker < nMarker_InletFile; iMarker++) {
18489 nRowCum_InletFile[iMarker+1] = nRowCum_InletFile[iMarker] + nRow_InletFile[iMarker];
18490 nRowCum_Counter[iMarker+1] = nRowCum_Counter[iMarker] + nRow_InletFile[iMarker];
18495 jPoint = 0; kPoint = 0;
18496 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
18497 for (iPoint = 0; iPoint < Buffer_Recv_nPoin[iProcessor]; iPoint++) {
18498 for (iMarker = 0; iMarker < nMarker_InletFile; iMarker++) {
18499 if (Marker_Tags_InletFile[iMarker] == Marker_Tags[kPoint]) {
18503 index = nRowCum_Counter[iMarker];
18504 InletCoords[0][index] = Buffer_Recv_X[jPoint];
18505 InletCoords[1][index] = Buffer_Recv_Y[jPoint];
18506 if (nDim == 3) InletCoords[2][index] = Buffer_Recv_Z[jPoint];
18510 nRowCum_Counter[iMarker]++;
18524 jPoint = (iProcessor+1)*MaxLocalPoint;
18531 delete [] Buffer_Send_X;
18532 delete [] Buffer_Send_Y;
18533 if (Buffer_Send_Z != NULL)
delete [] Buffer_Send_Z;
18534 delete [] Buffer_Send_Str;
18536 delete [] Buffer_Recv_X;
18537 delete [] Buffer_Recv_Y;
18538 if (Buffer_Recv_Z != NULL)
delete [] Buffer_Recv_Z;
18539 delete [] Buffer_Recv_nPoin;
18540 delete [] Buffer_Recv_Str;
18541 delete [] nRowCum_Counter;
18548 unsigned short iMarker, iDim, iVar;
18549 unsigned long iPoint;
18552 const unsigned short nDim = geometry->
GetnDim();
18558 unsigned short nVar_Turb = 0;
18580 unsigned short nCol_InletFile = nDim + 2 + nDim + nVar_Turb;
18586 ofstream node_file(
"inlet_example.dat");
18588 node_file <<
"NMARK= " << nMarker_InletFile << endl;
18590 for (iMarker = 0; iMarker < nMarker_InletFile; iMarker++) {
18594 string Marker_Tag = Marker_Tags_InletFile[iMarker];
18601 node_file <<
"MARKER_TAG= " << Marker_Tag << endl;
18602 node_file <<
"NROW=" << nRow_InletFile[iMarker] << endl;
18603 node_file <<
"NCOL=" << nCol_InletFile << endl;
18605 node_file << setprecision(15);
18606 node_file << std::scientific;
18610 for (iPoint = nRowCum_InletFile[iMarker]; iPoint < nRowCum_InletFile[iMarker+1]; iPoint++) {
18612 for (iDim = 0; iDim < nDim; iDim++) {
18613 node_file << InletCoords[iDim][iPoint] <<
"\t";
18615 node_file << t_total <<
"\t" << p_total;
18616 for (iDim = 0; iDim < nDim; iDim++) {
18617 node_file <<
"\t" << flow_dir[iDim];
18619 for (iVar = 0; iVar < nVar_Turb; iVar++) {
18620 node_file <<
"\t" << turb_val[iVar];
18632 err <<
" Created a template inlet profile file with node coordinates" << endl;
18633 err <<
" and solver variables at `inlet_example.dat`." << endl;
18634 err <<
" You can use this file as a guide for making your own inlet" << endl;
18635 err <<
" specification." << endl << endl;
18642 unsigned short iDim, nDim = geometry->
GetnDim();
18650 if (nRow_InletFile != NULL)
delete [] nRow_InletFile;
18651 if (nRowCum_InletFile != NULL)
delete [] nRowCum_InletFile;
18653 Marker_Tags_InletFile.clear();
18655 for (iDim = 0; iDim < nDim; iDim++) {
18656 if (InletCoords[iDim] != NULL)
delete [] InletCoords[iDim];
18658 if (InletCoords != NULL)
delete [] InletCoords;
18665 unsigned short iDim, iMarker, iMarker_Analyze;
18666 unsigned long iVertex, iPoint;
18667 su2double Mach = 0.0, Pressure, Temperature = 0.0, TotalPressure = 0.0, TotalTemperature = 0.0,
18668 Enthalpy, Velocity[3], TangVel[3], Velocity2, MassFlow, Density, Area,
18669 AxiFactor = 1.0, SoundSpeed, Vn, Vn2, Vtang2, Weight = 1.0;
18674 unsigned short nDim = geometry->
GetnDim();
18703 for (iMarker = 0; iMarker < nMarker; iMarker++) {
18705 Surface_MassFlow[iMarker] = 0.0;
18706 Surface_Mach[iMarker] = 0.0;
18707 Surface_Temperature[iMarker] = 0.0;
18708 Surface_Density[iMarker] = 0.0;
18709 Surface_Enthalpy[iMarker] = 0.0;
18710 Surface_NormalVelocity[iMarker] = 0.0;
18711 Surface_StreamVelocity2[iMarker] = 0.0;
18712 Surface_TransvVelocity2[iMarker] = 0.0;
18713 Surface_Pressure[iMarker] = 0.0;
18714 Surface_TotalTemperature[iMarker] = 0.0;
18715 Surface_TotalPressure[iMarker] = 0.0;
18716 Surface_VelocityIdeal[iMarker] = 0.0;
18717 Surface_Area[iMarker] = 0.0;
18718 Surface_MassFlow_Abs[iMarker] = 0.0;
18722 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
18729 if (axisymmetric) {
18739 Velocity2 = 0.0; Area = 0.0; MassFlow = 0.0; Vn = 0.0; Vtang2 = 0.0;
18741 for (iDim = 0; iDim < nDim; iDim++) {
18742 Area += (Vector[iDim] * AxiFactor) * (Vector[iDim] * AxiFactor);
18744 Velocity2 += Velocity[iDim] * Velocity[iDim];
18745 Vn += Velocity[iDim] * Vector[iDim] * AxiFactor;
18746 MassFlow += Vector[iDim] * AxiFactor * Density * Velocity[iDim];
18749 Area = sqrt (Area);
18750 if (AxiFactor == 0.0) Vn = 0.0;
else Vn /= Area;
18755 for (iDim = 0; iDim < nDim; iDim++) {
18756 TangVel[iDim] = Velocity[iDim] - Vn*Vector[iDim]*AxiFactor/Area;
18757 Vtang2 += TangVel[iDim]*TangVel[iDim];
18760 if (incompressible){
18771 TotalPressure = Pressure + 0.5*Density*Velocity2;
18774 Mach = sqrt(Velocity2)/SoundSpeed;
18775 Temperature = Pressure / (Gas_Constant * Density);
18777 TotalTemperature = Temperature * (1.0 + Mach * Mach * 0.5 * (Gamma - 1.0));
18778 TotalPressure = Pressure * pow( 1.0 + Mach * Mach * 0.5 * (Gamma - 1.0), Gamma / (Gamma - 1.0));
18783 Surface_Area[iMarker] += Area;
18784 Surface_MassFlow[iMarker] += MassFlow;
18785 Surface_MassFlow_Abs[iMarker] += abs(MassFlow);
18788 else if (Kind_Average ==
AVERAGE_AREA) Weight = abs(Area);
18791 Surface_Mach[iMarker] += Mach*Weight;
18792 Surface_Temperature[iMarker] += Temperature*Weight;
18793 Surface_Density[iMarker] += Density*Weight;
18794 Surface_Enthalpy[iMarker] += Enthalpy*Weight;
18795 Surface_NormalVelocity[iMarker] += Vn*Weight;
18796 Surface_Pressure[iMarker] += Pressure*Weight;
18797 Surface_TotalTemperature[iMarker] += TotalTemperature*Weight;
18798 Surface_TotalPressure[iMarker] += TotalPressure*Weight;
18802 Weight = abs(Area);
18804 Surface_StreamVelocity2[iMarker] += Vn2*Weight;
18805 Surface_TransvVelocity2[iMarker] += Vtang2*Weight;
18846 for (iMarker_Analyze = 0; iMarker_Analyze < nMarker_Analyze; iMarker_Analyze++) {
18847 Surface_MassFlow_Local[iMarker_Analyze] = 0.0;
18848 Surface_Mach_Local[iMarker_Analyze] = 0.0;
18849 Surface_Temperature_Local[iMarker_Analyze] = 0.0;
18850 Surface_Density_Local[iMarker_Analyze] = 0.0;
18851 Surface_Enthalpy_Local[iMarker_Analyze] = 0.0;
18852 Surface_NormalVelocity_Local[iMarker_Analyze] = 0.0;
18853 Surface_StreamVelocity2_Local[iMarker_Analyze] = 0.0;
18854 Surface_TransvVelocity2_Local[iMarker_Analyze] = 0.0;
18855 Surface_Pressure_Local[iMarker_Analyze] = 0.0;
18856 Surface_TotalTemperature_Local[iMarker_Analyze] = 0.0;
18857 Surface_TotalPressure_Local[iMarker_Analyze] = 0.0;
18858 Surface_Area_Local[iMarker_Analyze] = 0.0;
18859 Surface_MassFlow_Abs_Local[iMarker_Analyze] = 0.0;
18861 Surface_MassFlow_Total[iMarker_Analyze] = 0.0;
18862 Surface_Mach_Total[iMarker_Analyze] = 0.0;
18863 Surface_Temperature_Total[iMarker_Analyze] = 0.0;
18864 Surface_Density_Total[iMarker_Analyze] = 0.0;
18865 Surface_Enthalpy_Total[iMarker_Analyze] = 0.0;
18866 Surface_NormalVelocity_Total[iMarker_Analyze] = 0.0;
18867 Surface_StreamVelocity2_Total[iMarker_Analyze] = 0.0;
18868 Surface_TransvVelocity2_Total[iMarker_Analyze] = 0.0;
18869 Surface_Pressure_Total[iMarker_Analyze] = 0.0;
18870 Surface_TotalTemperature_Total[iMarker_Analyze] = 0.0;
18871 Surface_TotalPressure_Total[iMarker_Analyze] = 0.0;
18872 Surface_Area_Total[iMarker_Analyze] = 0.0;
18873 Surface_MassFlow_Abs_Total[iMarker_Analyze] = 0.0;
18875 Surface_MomentumDistortion_Total[iMarker_Analyze] = 0.0;
18881 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
18885 for (iMarker_Analyze= 0; iMarker_Analyze < nMarker_Analyze; iMarker_Analyze++) {
18890 Surface_MassFlow_Local[iMarker_Analyze] += Surface_MassFlow[iMarker];
18891 Surface_Mach_Local[iMarker_Analyze] += Surface_Mach[iMarker];
18892 Surface_Temperature_Local[iMarker_Analyze] += Surface_Temperature[iMarker];
18893 Surface_Density_Local[iMarker_Analyze] += Surface_Density[iMarker];
18894 Surface_Enthalpy_Local[iMarker_Analyze] += Surface_Enthalpy[iMarker];
18895 Surface_NormalVelocity_Local[iMarker_Analyze] += Surface_NormalVelocity[iMarker];
18896 Surface_StreamVelocity2_Local[iMarker_Analyze] += Surface_StreamVelocity2[iMarker];
18897 Surface_TransvVelocity2_Local[iMarker_Analyze] += Surface_TransvVelocity2[iMarker];
18898 Surface_Pressure_Local[iMarker_Analyze] += Surface_Pressure[iMarker];
18899 Surface_TotalTemperature_Local[iMarker_Analyze] += Surface_TotalTemperature[iMarker];
18900 Surface_TotalPressure_Local[iMarker_Analyze] += Surface_TotalPressure[iMarker];
18901 Surface_Area_Local[iMarker_Analyze] += Surface_Area[iMarker];
18902 Surface_MassFlow_Abs_Local[iMarker_Analyze] += Surface_MassFlow_Abs[iMarker];
18929 for (iMarker_Analyze = 0; iMarker_Analyze < nMarker_Analyze; iMarker_Analyze++) {
18930 Surface_MassFlow_Total[iMarker_Analyze] = Surface_MassFlow_Local[iMarker_Analyze];
18931 Surface_Mach_Total[iMarker_Analyze] = Surface_Mach_Local[iMarker_Analyze];
18932 Surface_Temperature_Total[iMarker_Analyze] = Surface_Temperature_Local[iMarker_Analyze];
18933 Surface_Density_Total[iMarker_Analyze] = Surface_Density_Local[iMarker_Analyze];
18934 Surface_Enthalpy_Total[iMarker_Analyze] = Surface_Enthalpy_Local[iMarker_Analyze];
18935 Surface_NormalVelocity_Total[iMarker_Analyze] = Surface_NormalVelocity_Local[iMarker_Analyze];
18936 Surface_StreamVelocity2_Total[iMarker_Analyze] = Surface_StreamVelocity2_Local[iMarker_Analyze];
18937 Surface_TransvVelocity2_Total[iMarker_Analyze] = Surface_TransvVelocity2_Local[iMarker_Analyze];
18938 Surface_Pressure_Total[iMarker_Analyze] = Surface_Pressure_Local[iMarker_Analyze];
18939 Surface_TotalTemperature_Total[iMarker_Analyze] = Surface_TotalTemperature_Local[iMarker_Analyze];
18940 Surface_TotalPressure_Total[iMarker_Analyze] = Surface_TotalPressure_Local[iMarker_Analyze];
18941 Surface_Area_Total[iMarker_Analyze] = Surface_Area_Local[iMarker_Analyze];
18942 Surface_MassFlow_Abs_Total[iMarker_Analyze] = Surface_MassFlow_Abs_Local[iMarker_Analyze];
18950 for (iMarker_Analyze = 0; iMarker_Analyze < nMarker_Analyze; iMarker_Analyze++) {
18952 if (Kind_Average ==
AVERAGE_MASSFLUX) Weight = Surface_MassFlow_Abs_Total[iMarker_Analyze];
18953 else if (Kind_Average ==
AVERAGE_AREA) Weight = abs(Surface_Area_Total[iMarker_Analyze]);
18956 if (Weight != 0.0) {
18957 Surface_Mach_Total[iMarker_Analyze] /= Weight;
18958 Surface_Temperature_Total[iMarker_Analyze] /= Weight;
18959 Surface_Density_Total[iMarker_Analyze] /= Weight;
18960 Surface_Enthalpy_Total[iMarker_Analyze] /= Weight;
18961 Surface_NormalVelocity_Total[iMarker_Analyze] /= Weight;
18962 Surface_Pressure_Total[iMarker_Analyze] /= Weight;
18963 Surface_TotalTemperature_Total[iMarker_Analyze] /= Weight;
18964 Surface_TotalPressure_Total[iMarker_Analyze] /= Weight;
18967 Surface_Mach_Total[iMarker_Analyze] = 0.0;
18968 Surface_Temperature_Total[iMarker_Analyze] = 0.0;
18969 Surface_Density_Total[iMarker_Analyze] = 0.0;
18970 Surface_Enthalpy_Total[iMarker_Analyze] = 0.0;
18971 Surface_NormalVelocity_Total[iMarker_Analyze] = 0.0;
18972 Surface_Pressure_Total[iMarker_Analyze] = 0.0;
18973 Surface_TotalTemperature_Total[iMarker_Analyze] = 0.0;
18974 Surface_TotalPressure_Total[iMarker_Analyze] = 0.0;
18979 Area = fabs(Surface_Area_Total[iMarker_Analyze]);
18982 Surface_MomentumDistortion_Total[iMarker_Analyze] = Surface_StreamVelocity2_Total[iMarker_Analyze]/(Surface_NormalVelocity_Total[iMarker_Analyze]*Surface_NormalVelocity_Total[iMarker_Analyze]*Area) - 1.0;
18983 Surface_StreamVelocity2_Total[iMarker_Analyze] /= Area;
18984 Surface_TransvVelocity2_Total[iMarker_Analyze] /= Area;
18987 Surface_MomentumDistortion_Total[iMarker_Analyze] = 0.0;
18988 Surface_StreamVelocity2_Total[iMarker_Analyze] = 0.0;
18989 Surface_TransvVelocity2_Total[iMarker_Analyze] = 0.0;
18994 for (iMarker_Analyze = 0; iMarker_Analyze < nMarker_Analyze; iMarker_Analyze++) {
19000 su2double Mach = Surface_Mach_Total[iMarker_Analyze];
19012 su2double Enthalpy = Surface_Enthalpy_Total[iMarker_Analyze];
19024 su2double MomentumDistortion = Surface_MomentumDistortion_Total[iMarker_Analyze];
19027 su2double SecondOverUniform = SecondaryStrength/Uniformity;
19045 for (iMarker_Analyze = 0; iMarker_Analyze < nMarker_Analyze; iMarker_Analyze++) {
19046 if (nMarker_Analyze == 2) {
19057 cout.setf(ios::scientific, ios::floatfield);
19058 cout << endl <<
"Computing surface mean values." << endl << endl;
19060 for (iMarker_Analyze = 0; iMarker_Analyze < nMarker_Analyze; iMarker_Analyze++) {
19063 if (nDim == 3) {
if (config->
GetSystemMeasurements() ==
SI) cout << setw(20) <<
"Area (m^2): ";
else cout << setw(20) <<
"Area (ft^2): "; }
19064 else {
if (config->
GetSystemMeasurements() ==
SI) cout << setw(20) <<
"Area (m): ";
else cout << setw(20) <<
"Area (ft): "; }
19067 else if (config->
GetSystemMeasurements() ==
US) cout << setw(15) << fabs(Surface_Area_Total[iMarker_Analyze])*12.0*12.0;
19077 else if (config->
GetSystemMeasurements() ==
US) cout << setw(20) <<
"Vn (ft/s): " << setw(15) << NormalVelocity;
19082 if (config->
GetSystemMeasurements() ==
SI) cout << setw(20) <<
"Uniformity (m/s): " << setw(15) << Uniformity;
19083 else if (config->
GetSystemMeasurements() ==
US) cout << setw(20) <<
"Uniformity (ft/s): " << setw(15) << Uniformity;
19086 if (config->
GetSystemMeasurements() ==
SI) cout << setw(20) <<
"Secondary (m/s): " << setw(15) << SecondaryStrength;
19087 else if (config->
GetSystemMeasurements() ==
US) cout << setw(20) <<
"Secondary (ft/s): " << setw(15) << SecondaryStrength;
19092 cout << setw(20) <<
"Mom. Distortion: " << setw(15) << MomentumDistortion;
19095 cout << setw(20) <<
"Second/Uniform: " << setw(15) << SecondOverUniform;
19105 else if (config->
GetSystemMeasurements() ==
US) cout << setw(20) <<
"PT (psf): " << setw(15) <<TotalPressure;
19110 cout << setw(20) <<
"Mach: " << setw(15) << Mach;
19114 else if (config->
GetSystemMeasurements() ==
US) cout << setw(20) <<
"Rho (lb/ft^3): " << setw(15) << Density*32.174;
19118 if (compressible || energy) {
19125 else if (config->
GetSystemMeasurements() ==
US) cout << setw(20) <<
"TT (R): " << setw(15) << TotalTemperature;
19131 cout.unsetf(ios_base::floatfield);
19135 delete [] Surface_MassFlow_Local;
19136 delete [] Surface_Mach_Local;
19137 delete [] Surface_Temperature_Local;
19138 delete [] Surface_Density_Local;
19139 delete [] Surface_Enthalpy_Local;
19140 delete [] Surface_NormalVelocity_Local;
19141 delete [] Surface_Pressure_Local;
19142 delete [] Surface_TotalTemperature_Local;
19143 delete [] Surface_TotalPressure_Local;
19144 delete [] Surface_Area_Local;
19145 delete [] Surface_MassFlow_Abs_Local;
19147 delete [] Surface_MassFlow_Total;
19148 delete [] Surface_Mach_Total;
19149 delete [] Surface_Temperature_Total;
19150 delete [] Surface_Density_Total;
19151 delete [] Surface_Enthalpy_Total;
19152 delete [] Surface_NormalVelocity_Total;
19153 delete [] Surface_Pressure_Total;
19154 delete [] Surface_TotalTemperature_Total;
19155 delete [] Surface_TotalPressure_Total;
19156 delete [] Surface_Area_Total;
19157 delete [] Surface_MassFlow_Abs_Total;
19159 delete [] Surface_MassFlow;
19160 delete [] Surface_Mach;
19161 delete [] Surface_Temperature;
19162 delete [] Surface_Density;
19163 delete [] Surface_Enthalpy;
19164 delete [] Surface_NormalVelocity;
19165 delete [] Surface_Pressure;
19166 delete [] Surface_TotalTemperature;
19167 delete [] Surface_TotalPressure;
19168 delete [] Surface_Area;
19170 delete [] Surface_VelocityIdeal;
19171 delete [] Surface_MassFlow_Abs;
19191 cout <<
"Merging volumetric triangle grid connectivity." << endl;
19195 cout <<
"Merging volumetric quadrilateral grid connectivity." << endl;
19199 cout <<
"Merging volumetric tetrahedron grid connectivity." << endl;
19203 cout <<
"Merging volumetric hexahedron grid connectivity." << endl;
19207 cout <<
"Merging volumetric prism grid connectivity." << endl;
19211 cout <<
"Merging volumetric pyramid grid connectivity." << endl;
19221 cout <<
"Merging surface line grid connectivity." << endl;
19225 cout <<
"Merging surface triangle grid connectivity." << endl;
19229 cout <<
"Merging surface quadrilateral grid connectivity." << endl;
19236 nGlobal_Elem = nGlobal_Tria + nGlobal_Quad + nGlobal_Tetr +
19237 nGlobal_Hexa + nGlobal_Pyra + nGlobal_Pris;
19241 nSurf_Elem = nGlobal_Line + nGlobal_BoundTria + nGlobal_BoundQuad;
19249 unsigned short iDim;
19250 unsigned long iPoint;
19256 unsigned short nDim = DGGeometry->
GetnDim();
19262 vector<su2double> DOFsCoords;
19263 vector<unsigned long> globalID;
19267 unsigned long nLocalPoint = 0;
19268 for(
unsigned long l=0; l<nVolElemOwned; ++l) {
19269 for(
unsigned short j=0; j<volElem[l].
nDOFsSol; ++j) {
19272 globalID.push_back(globalIndex);
19275 for(
unsigned short k=0; k<nDim; ++k) DOFsCoords.push_back(coor[k]);
19288 nGlobal_Poin = nLocalPoint;
19289 nGlobal_Doma = nLocalPoint;
19294 for (iDim = 0; iDim < nDim; iDim++) {
19295 Coords[iDim] =
new su2double[nGlobal_Poin];
19300 for (iPoint = 0; iPoint < nLocalPoint; iPoint++) {
19307 unsigned long iGlobal_Index = globalID[iPoint];
19309 for (iDim = 0; iDim < nDim; iDim++) {
19310 Coords[iDim][iGlobal_Index] = DOFsCoords[iPoint*nDim+iDim];
19315 Coords[iDim][iGlobal_Index] *= 12.0;
19323 int iProcessor, nProcessor =
size;
19324 unsigned long jPoint;
19328 unsigned long Buffer_Send_nPoin[1], *Buffer_Recv_nPoin = NULL;
19329 unsigned long MaxLocalPoint = 0;
19330 unsigned long iGlobal_Index = 0, nBuffer_Scalar = 0;
19332 if (
rank ==
MASTER_NODE) Buffer_Recv_nPoin =
new unsigned long[nProcessor];
19340 Buffer_Send_nPoin[0] = nLocalPoint;
19350 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
19351 nGlobal_Doma += Buffer_Recv_nPoin[iProcessor];
19354 nBuffer_Scalar = MaxLocalPoint;
19364 su2double *Buffer_Send_Z = NULL, *Buffer_Recv_Z = NULL;
19365 if (nDim == 3) Buffer_Send_Z =
new su2double[MaxLocalPoint];
19367 unsigned long *Buffer_Send_GlobalIndex =
new unsigned long[MaxLocalPoint];
19368 unsigned long *Buffer_Recv_GlobalIndex = NULL;
19374 Buffer_Recv_X =
new su2double[nProcessor*MaxLocalPoint];
19375 Buffer_Recv_Y =
new su2double[nProcessor*MaxLocalPoint];
19376 if (nDim == 3) Buffer_Recv_Z =
new su2double[nProcessor*MaxLocalPoint];
19377 Buffer_Recv_GlobalIndex =
new unsigned long[nProcessor*MaxLocalPoint];
19381 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
19382 nGlobal_Poin += Buffer_Recv_nPoin[iProcessor];
19385 for (iDim = 0; iDim < nDim; iDim++) {
19386 Coords[iDim] =
new su2double[nGlobal_Poin];
19397 for (iPoint = 0; iPoint < nLocalPoint; iPoint++) {
19403 Buffer_Send_X[jPoint] = DOFsCoords[iPoint*nDim+0];
19404 Buffer_Send_Y[jPoint] = DOFsCoords[iPoint*nDim+1];
19405 if (nDim == 3) Buffer_Send_Z[jPoint] = DOFsCoords[iPoint*nDim+2];
19410 Buffer_Send_X[jPoint] *= 12.0;
19411 Buffer_Send_Y[jPoint] *= 12.0;
19412 if (nDim == 3) Buffer_Send_Z[jPoint] *= 12.0;
19416 Buffer_Send_GlobalIndex[jPoint] = globalID[iPoint];
19437 for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
19438 for (iPoint = 0; iPoint < Buffer_Recv_nPoin[iProcessor]; iPoint++) {
19440 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
19441 if (iGlobal_Index >= nGlobal_Poin){
19442 cout << iGlobal_Index <<
" " << nGlobal_Poin << endl;
19444 Coords[0][iGlobal_Index] = Buffer_Recv_X[jPoint];
19445 Coords[1][iGlobal_Index] = Buffer_Recv_Y[jPoint];
19446 if (nDim == 3) Coords[2][iGlobal_Index] = Buffer_Recv_Z[jPoint];
19450 jPoint = (iProcessor+1)*nBuffer_Scalar;
19457 delete [] Buffer_Send_X;
19458 delete [] Buffer_Send_Y;
19459 if (Buffer_Send_Z != NULL)
delete [] Buffer_Send_Z;
19460 delete [] Buffer_Send_GlobalIndex;
19462 delete [] Buffer_Recv_X;
19463 delete [] Buffer_Recv_Y;
19464 if (Buffer_Recv_Z != NULL)
delete [] Buffer_Recv_Z;
19465 delete [] Buffer_Recv_GlobalIndex;
19466 delete [] Buffer_Recv_nPoin;
19476 unsigned short NODES_PER_ELEMENT = 0;
19477 unsigned long iNode, jNode;
19478 unsigned long iElem = 0;
19479 unsigned long nLocalElem = 0, nElem_Total = 0;
19481 unsigned long jElem;
19483 unsigned long Buffer_Send_nElem[1], *Buffer_Recv_nElem = NULL;
19484 unsigned long nBuffer_Scalar = 0;
19485 unsigned long kNode = 0, kElem = 0;
19486 unsigned long MaxLocalElem = 0;
19489 bool *Write_Elem = NULL;
19491 int *Conn_Elem = NULL;
19504 vector<unsigned long> volumeConn;
19507 map<unsigned long, unsigned long> mapLocal2Global;
19508 unsigned long ii = 0;
19509 for(
unsigned long i=0; i<nVolElemOwned; ++i) {
19510 for(
unsigned short j=0; j<volElem[i].
nDOFsSol; ++j, ++ii) {
19517 for(
unsigned long i=0; i<nVolElemOwned; ++i) {
19523 const unsigned short VTK_Type1 = standardElementsSol[ind].
GetVTK_Type1();
19524 const unsigned short VTK_Type2 = standardElementsSol[ind].
GetVTK_Type2();
19528 if (Elem_Type == VTK_Type1) {
19531 const unsigned short nDOFsPerSubElem = standardElementsSol[ind].
GetNDOFsPerSubElem(VTK_Type1);
19532 const unsigned short *connSubElems = standardElementsSol[ind].
GetSubConnType1();
19535 unsigned short kk = 0;
19536 for(
unsigned short j=0; j<nSubElems; ++j) {
19539 for(
unsigned short k=0; k<nDOFsPerSubElem; ++k, ++kk)
19540 volumeConn.push_back(mapLocal2Global[volElem[i].
offsetDOFsSolLocal+connSubElems[kk]]);
19545 }
else if (Elem_Type == VTK_Type2) {
19548 const unsigned short nDOFsPerSubElem = standardElementsSol[ind].
GetNDOFsPerSubElem(VTK_Type2);
19549 const unsigned short *connSubElems = standardElementsSol[ind].
GetSubConnType2();
19552 unsigned short kk = 0;
19553 for(
unsigned short j=0; j<nSubElems; ++j) {
19556 for(
unsigned short k=0; k<nDOFsPerSubElem; ++k, ++kk)
19557 volumeConn.push_back(mapLocal2Global[volElem[i].
offsetDOFsSolLocal+connSubElems[kk]]);
19569 switch (Elem_Type) {
19595 Buffer_Send_nElem[0] = nLocalElem;
19602 MaxLocalElem = nLocalElem;
19603 Buffer_Recv_nElem[0] = Buffer_Send_nElem[0];
19606 nBuffer_Scalar = MaxLocalElem*NODES_PER_ELEMENT;
19610 unsigned long *Buffer_Send_Elem =
new unsigned long[nBuffer_Scalar];
19611 unsigned long *Buffer_Recv_Elem = NULL;
19613 unsigned short *Buffer_Send_Halo =
new unsigned short[MaxLocalElem];
19614 unsigned short *Buffer_Recv_Halo = NULL;
19619 Buffer_Recv_Elem =
new unsigned long[
size*nBuffer_Scalar];
19620 Buffer_Recv_Halo =
new unsigned short[
size*MaxLocalElem];
19621 if (MaxLocalElem > 0) Conn_Elem =
new int[
size*MaxLocalElem*NODES_PER_ELEMENT];
19629 for (iElem = 0; iElem < nLocalElem; iElem++) {
19633 Buffer_Send_Halo[iElem] =
false;
19634 for (iNode = 0; iNode < NODES_PER_ELEMENT; iNode++) {
19638 Buffer_Send_Elem[jNode] = volumeConn[iElem*NODES_PER_ELEMENT+iNode];
19653 for (
unsigned long iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Elem[iPoint] = Buffer_Send_Elem[iPoint];
19654 for (
unsigned long iPoint = 0; iPoint < MaxLocalElem; iPoint++) Buffer_Recv_Halo[iPoint] = Buffer_Send_Halo[iPoint];
19665 Write_Elem =
new bool[
size*MaxLocalElem];
19666 for (iElem = 0; iElem <
size*MaxLocalElem; iElem++) {
19667 Write_Elem[iElem] =
true;
19678 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
19679 for (iElem = 0; iElem < Buffer_Recv_nElem[iProcessor]; iElem++) {
19682 if (Buffer_Recv_Halo[kElem+iElem])
19683 Write_Elem[kElem+iElem] =
false;
19686 kElem = (iProcessor+1)*MaxLocalElem;
19692 jNode = 0; kNode = 0; jElem = 0; nElem_Total = 0;
19693 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
19694 for (iElem = 0; iElem < Buffer_Recv_nElem[iProcessor]; iElem++) {
19697 if (Write_Elem[jElem+iElem]) {
19706 for (iNode = 0; iNode < NODES_PER_ELEMENT; iNode++) {
19707 Conn_Elem[kNode] = (int)Buffer_Recv_Elem[jNode+iElem*NODES_PER_ELEMENT+iNode] + 1;
19713 jElem = (iProcessor+1)*MaxLocalElem;
19714 jNode = (iProcessor+1)*nBuffer_Scalar;
19719 delete [] Buffer_Send_Elem;
19720 delete [] Buffer_Send_Halo;
19722 delete [] Buffer_Recv_nElem;
19723 delete [] Buffer_Recv_Elem;
19724 delete [] Buffer_Recv_Halo;
19725 delete [] Write_Elem;
19732 switch (Elem_Type) {
19734 nGlobal_Tria = nElem_Total;
19735 if (nGlobal_Tria > 0) Conn_Tria = Conn_Elem;
19738 nGlobal_Quad = nElem_Total;
19739 if (nGlobal_Quad > 0) Conn_Quad = Conn_Elem;
19742 nGlobal_Tetr = nElem_Total;
19743 if (nGlobal_Tetr > 0) Conn_Tetr = Conn_Elem;
19746 nGlobal_Hexa = nElem_Total;
19747 if (nGlobal_Hexa > 0) Conn_Hexa = Conn_Elem;
19750 nGlobal_Pris = nElem_Total;
19751 if (nGlobal_Pris > 0) Conn_Pris = Conn_Elem;
19754 nGlobal_Pyra = nElem_Total;
19755 if (nGlobal_Pyra > 0) Conn_Pyra = Conn_Elem;
19766 unsigned short NODES_PER_ELEMENT = 0;
19768 unsigned long iNode, jNode;
19769 unsigned long iElem = 0;
19770 unsigned long nLocalElem = 0, nElem_Total = 0;
19773 unsigned long jElem;
19775 unsigned long Buffer_Send_nElem[1], *Buffer_Recv_nElem = NULL;
19776 unsigned long nBuffer_Scalar = 0;
19777 unsigned long kNode = 0, kElem = 0;
19778 unsigned long MaxLocalElem = 0;
19781 bool *Write_Elem = NULL;
19783 int *Conn_Elem = NULL;
19798 map<unsigned long, unsigned long> mapLocal2Global;
19799 unsigned long ii = 0;
19800 for(
unsigned long i=0; i<nVolElemOwned; ++i) {
19801 for(
unsigned short j=0; j<volElem[i].
nDOFsSol; ++j, ++ii) {
19807 vector<unsigned long> surfaceConn;
19813 for(
unsigned short iMarker=0; iMarker < config->
GetnMarker_All(); ++iMarker) {
19814 if( !boundaries[iMarker].periodicBoundary ) {
19820 const vector<CSurfaceElementFEM> &surfElem = boundaries[iMarker].
surfElem;
19821 for(
unsigned long i=0; i<surfElem.size(); ++i) {
19826 const unsigned short ind = surfElem[i].indStandardElement;
19827 const unsigned short VTK_Type = standardBoundaryFacesSol[ind].
GetVTK_Type();
19831 if (VTK_Type == Elem_Type) {
19833 const unsigned short nSubFaces = standardBoundaryFacesSol[ind].
GetNSubFaces();
19834 const unsigned short nDOFsPerFace = standardBoundaryFacesSol[ind].
GetNDOFsPerSubFace();
19835 const unsigned short *connSubFaces = standardBoundaryFacesSol[ind].
GetSubFaceConn();
19838 unsigned short ii = 0;
19839 for(
unsigned short j=0; j<nSubFaces; ++j) {
19842 for(
unsigned short k=0; k<nDOFsPerFace; ++k, ++ii)
19843 surfaceConn.push_back(mapLocal2Global[surfElem[i].DOFsSolFace[connSubFaces[ii]]]);
19853 switch (Elem_Type) {
19870 Buffer_Send_nElem[0] = nLocalElem;
19877 MaxLocalElem = nLocalElem;
19878 Buffer_Recv_nElem[0] = Buffer_Send_nElem[0];
19881 nBuffer_Scalar = MaxLocalElem*NODES_PER_ELEMENT;
19885 unsigned long *Buffer_Send_Elem =
new unsigned long[nBuffer_Scalar];
19886 unsigned long *Buffer_Recv_Elem = NULL;
19888 unsigned short *Buffer_Send_Halo =
new unsigned short[MaxLocalElem];
19889 unsigned short *Buffer_Recv_Halo = NULL;
19894 Buffer_Recv_Elem =
new unsigned long[
size*nBuffer_Scalar];
19895 Buffer_Recv_Halo =
new unsigned short[
size*MaxLocalElem];
19896 if (MaxLocalElem > 0) Conn_Elem =
new int[
size*MaxLocalElem*NODES_PER_ELEMENT];
19903 for (iElem = 0; iElem < nLocalElem; iElem++) {
19907 Buffer_Send_Halo[iElem] =
false;
19908 for (iNode = 0; iNode < NODES_PER_ELEMENT; iNode++) {
19911 Buffer_Send_Elem[jNode] = surfaceConn[iElem*NODES_PER_ELEMENT+iNode];
19924 for (
unsigned long iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Elem[iPoint] = Buffer_Send_Elem[iPoint];
19925 for (
unsigned long iPoint = 0; iPoint < MaxLocalElem; iPoint++) Buffer_Recv_Halo[iPoint] = Buffer_Send_Halo[iPoint];
19936 Write_Elem =
new bool[
size*MaxLocalElem];
19937 for (iElem = 0; iElem <
size*MaxLocalElem; iElem++) {
19938 Write_Elem[iElem] =
true;
19949 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
19950 for (iElem = 0; iElem < Buffer_Recv_nElem[iProcessor]; iElem++) {
19953 if (Buffer_Recv_Halo[kElem+iElem])
19954 Write_Elem[kElem+iElem] =
false;
19957 kElem = (iProcessor+1)*MaxLocalElem;
19963 jNode = 0; kNode = 0; jElem = 0; nElem_Total = 0;
19964 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
19965 for (iElem = 0; iElem < Buffer_Recv_nElem[iProcessor]; iElem++) {
19968 if (Write_Elem[jElem+iElem]) {
19977 for (iNode = 0; iNode < NODES_PER_ELEMENT; iNode++) {
19978 Conn_Elem[kNode] = (int)Buffer_Recv_Elem[jNode+iElem*NODES_PER_ELEMENT+iNode] + 1;
19984 jElem = (iProcessor+1)*MaxLocalElem;
19985 jNode = (iProcessor+1)*nBuffer_Scalar;
19990 delete [] Buffer_Send_Elem;
19991 delete [] Buffer_Send_Halo;
19993 delete [] Buffer_Recv_nElem;
19994 delete [] Buffer_Recv_Elem;
19995 delete [] Buffer_Recv_Halo;
19996 delete [] Write_Elem;
20003 switch (Elem_Type) {
20005 nGlobal_Line = nElem_Total;
20006 if (nGlobal_Line > 0) Conn_Line = Conn_Elem;
20009 nGlobal_BoundTria = nElem_Total;
20010 if (nGlobal_BoundTria > 0) Conn_BoundTria = Conn_Elem;
20013 nGlobal_BoundQuad = nElem_Total;
20014 if (nGlobal_BoundQuad > 0) Conn_BoundQuad = Conn_Elem;
20025 unsigned short iVar = 0, FirstIndex =
NONE, SecondIndex =
NONE, ThirdIndex =
NONE;
20026 unsigned short nVar_First = 0, nVar_Second = 0, nVar_Third = 0;
20028 unsigned long iPoint = 0, jPoint = 0;
20030 unsigned long Buffer_Send_nPoint[1], *Buffer_Recv_nPoint = NULL;
20031 unsigned long nLocalPoint = 0, MaxLocalPoint = 0;
20032 unsigned long iGlobal_Index = 0, nBuffer_Scalar = 0;
20040 switch (Kind_Solver) {
20042 default: SecondIndex =
NONE; ThirdIndex =
NONE;
break;
20045 nVar_First = solver[FirstIndex]->
GetnVar();
20046 if (SecondIndex !=
NONE) nVar_Second = solver[SecondIndex]->
GetnVar();
20047 if (ThirdIndex !=
NONE) nVar_Third = solver[ThirdIndex]->
GetnVar();
20048 nVar_Consv = nVar_First + nVar_Second + nVar_Third;
20049 nVar_Total = nVar_Consv;
20059 map<unsigned long, unsigned long> mapLocal2Global;
20060 vector<su2double> DOFsSol;
20061 vector<unsigned long> globalID;
20064 for(
unsigned long l=0; l<nVolElemOwned; ++l) {
20072 unsigned int i = 0;
20073 for(
unsigned short j=0; j<volElem[l].
nDOFsSol; ++j) {
20077 globalID.push_back(globalIndex);
20079 for(
unsigned short iVar=0; iVar<nVar_Consv; ++iVar, ++i) {
20080 DOFsSol.push_back(solDOFs[i]);
20084 Buffer_Send_nPoint[0] = nLocalPoint;
20094 MaxLocalPoint = nLocalPoint;
20095 Buffer_Recv_nPoint[0] = Buffer_Send_nPoint[0];
20098 nBuffer_Scalar = MaxLocalPoint;
20105 unsigned long *Buffer_Send_GlobalIndex =
new unsigned long[MaxLocalPoint];
20106 unsigned long *Buffer_Recv_GlobalIndex = NULL;
20113 Buffer_Recv_GlobalIndex =
new unsigned long[
size*MaxLocalPoint];
20117 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
20118 nGlobal_Poin += Buffer_Recv_nPoint[iProcessor];
20121 for (iVar = 0; iVar < nVar_Total; iVar++) {
20122 Data[iVar] =
new su2double[nGlobal_Poin];
20132 for (iVar = 0; iVar < nVar_Consv; iVar++) {
20137 for (iPoint = 0; iPoint < nLocalPoint; iPoint++) {
20141 Buffer_Send_Var[jPoint] = DOFsSol[iPoint*nVar_Consv+iVar];
20146 Buffer_Send_GlobalIndex[jPoint] = globalID[iPoint];
20158 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Var[iPoint] = Buffer_Send_Var[iPoint];
20165 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_GlobalIndex[iPoint] = Buffer_Send_GlobalIndex[iPoint];
20173 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
20174 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
20178 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
20180 Data[iVar][iGlobal_Index] = Buffer_Recv_Var[jPoint];
20186 jPoint = (iProcessor+1)*nBuffer_Scalar;
20194 delete [] Buffer_Send_Var;
20195 delete [] Buffer_Send_GlobalIndex;
20197 delete [] Buffer_Recv_nPoint;
20198 delete [] Buffer_Recv_Var;
20199 delete [] Buffer_Recv_GlobalIndex;
20207 unsigned short iVar;
20208 unsigned long iPoint = 0, jPoint = 0;
20210 unsigned long Buffer_Send_nPoint[1], *Buffer_Recv_nPoint = NULL;
20211 unsigned long nLocalPoint = 0, MaxLocalPoint = 0;
20212 unsigned long iGlobal_Index = 0, nBuffer_Scalar = 0;
20218 nVar_Total = config->
fields.size() - 1;
20228 vector<su2double> DOFsSol;
20229 vector<unsigned long> globalID;
20232 for(
unsigned long l=0; l<nVolElemOwned; ++l) {
20240 unsigned int i = 0;
20241 for(
unsigned short j=0; j<volElem[l].
nDOFsSol; ++j) {
20245 globalID.push_back(globalIndex);
20247 for(
unsigned short iVar=0; iVar<nVar_Total; ++iVar, ++i) {
20248 DOFsSol.push_back(solDOFs[i]);
20252 Buffer_Send_nPoint[0] = nLocalPoint;
20262 MaxLocalPoint = nLocalPoint;
20263 Buffer_Recv_nPoint[0] = Buffer_Send_nPoint[0];
20266 nBuffer_Scalar = MaxLocalPoint;
20273 unsigned long *Buffer_Send_GlobalIndex =
new unsigned long[MaxLocalPoint];
20274 unsigned long *Buffer_Recv_GlobalIndex = NULL;
20281 Buffer_Recv_GlobalIndex =
new unsigned long[
size*MaxLocalPoint];
20285 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
20286 nGlobal_Poin += Buffer_Recv_nPoint[iProcessor];
20289 for (iVar = 0; iVar < nVar_Total; iVar++) {
20290 Data[iVar] =
new su2double[nGlobal_Poin];
20300 for (iVar = 0; iVar < nVar_Total; iVar++) {
20305 for (iPoint = 0; iPoint < nLocalPoint; iPoint++) {
20309 Buffer_Send_Var[jPoint] = DOFsSol[iPoint*nVar_Total+iVar];
20314 Buffer_Send_GlobalIndex[jPoint] = globalID[iPoint];
20326 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_Var[iPoint] = Buffer_Send_Var[iPoint];
20333 for (iPoint = 0; iPoint < nBuffer_Scalar; iPoint++) Buffer_Recv_GlobalIndex[iPoint] = Buffer_Send_GlobalIndex[iPoint];
20341 for (iProcessor = 0; iProcessor <
size; iProcessor++) {
20342 for (iPoint = 0; iPoint < Buffer_Recv_nPoint[iProcessor]; iPoint++) {
20346 iGlobal_Index = Buffer_Recv_GlobalIndex[jPoint];
20348 Data[iVar][iGlobal_Index] = Buffer_Recv_Var[jPoint];
20354 jPoint = (iProcessor+1)*nBuffer_Scalar;
20362 delete [] Buffer_Send_Var;
20363 delete [] Buffer_Send_GlobalIndex;
20365 delete [] Buffer_Recv_nPoint;
20366 delete [] Buffer_Recv_Var;
20367 delete [] Buffer_Recv_GlobalIndex;
20373 unsigned long iExtIter,
unsigned short val_nZone) {
20375 unsigned short iZone;
20377 for (iZone = 0; iZone < val_nZone; iZone++) {
20381 if (config[iZone]->GetWrt_Output()) {
20396 if (Wrt_Vol || Wrt_Srf) {
20397 if (
rank ==
MASTER_NODE) cout << endl <<
"Merging connectivities in the Master node." << endl;
20405 if (
rank ==
MASTER_NODE) cout <<
"Merging coordinates in the Master node." << endl;
20410 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot binary volume and surface mesh files." << endl;
20418 if (
rank ==
MASTER_NODE) cout <<
"Merging solution in the Master node." << endl;
20429 if (
rank ==
MASTER_NODE) cout <<
"Writing SU2 native restart file." << endl;
20434 switch (FileFormat) {
20440 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot ASCII file volume solution file." << endl;
20449 if (
rank ==
MASTER_NODE) cout <<
"Writing FieldView ASCII file volume solution file." << endl;
20458 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot binary volume solution file." << endl;
20467 if (
rank ==
MASTER_NODE) cout <<
"Writing FieldView binary file volume solution file." << endl;
20476 if (
rank ==
MASTER_NODE) cout <<
"Writing Paraview ASCII volume solution file." << endl;
20489 switch (FileFormat) {
20495 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot ASCII surface solution file." << endl;
20504 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot binary surface solution file." << endl;
20513 if (
rank ==
MASTER_NODE) cout <<
"Writing Paraview ASCII surface solution file." << endl;
20540 if (
rank ==
MASTER_NODE) cout << endl <<
"Restart and solution output disabled." << endl;
20546 unsigned long iExtIter,
unsigned short val_nZone) {
20548 unsigned short iZone, iInst, nInst;
20550 for (iZone = 0; iZone < val_nZone; iZone++) {
20554 for (iInst = 0; iInst < nInst; iInst++) {
20571 if ((Wrt_Vol || Wrt_Srf)) {
20572 if (
rank ==
MASTER_NODE) cout <<
"Merging connectivities in the Master node." << endl;
20578 if ((Wrt_Vol || Wrt_Srf)) {
20579 if (
rank ==
MASTER_NODE) cout <<
"Merging solution in the Master node." << endl;
20591 switch (FileFormat) {
20597 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot ASCII file (volume grid)." << endl;
20598 SetTecplotASCII(config[iZone], geometry[iZone][iInst], &solver[iZone][iInst], iZone, val_nZone,
false);
20606 if (
rank ==
MASTER_NODE) cout <<
"Writing FieldView ASCII file (volume grid)." << endl;
20615 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot Binary file (volume grid)." << endl;
20624 if (
rank ==
MASTER_NODE) cout <<
"Writing FieldView ASCII file (volume grid)." << endl;
20633 if (
rank ==
MASTER_NODE) cout <<
"Writing Paraview ASCII file (volume grid)." << endl;
20634 SetParaview_ASCII(config[iZone], geometry[iZone][iInst], iZone, val_nZone,
false);
20646 switch (FileFormat) {
20652 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot ASCII file (surface grid)." << endl;
20653 SetTecplotASCII(config[iZone], geometry[iZone][iInst], &solver[iZone][iInst], iZone, val_nZone,
true);
20661 if (
rank ==
MASTER_NODE) cout <<
"Writing Tecplot Binary file (surface grid)." << endl;
20670 if (
rank ==
MASTER_NODE) cout <<
"Writing Paraview ASCII file (surface grid)." << endl;
20671 SetParaview_ASCII(config[iZone], geometry[iZone][iInst], iZone, val_nZone,
true);
20681 if (!wrote_base_file)
20683 if (!wrote_surf_file)
20687 if (Wrt_Vol || Wrt_Srf)
20703 unsigned short iDim;
20705 unsigned short nDim = geometry->
GetnDim();
20707 unsigned long iVar, jVar;
20708 unsigned long iPoint, jPoint, FirstIndex =
NONE, SecondIndex =
NONE;
20709 unsigned long nVar_First = 0, nVar_Second = 0, nVar_Consv_Par = 0;
20711 stringstream varname;
20716 switch (Kind_Solver) {
20719 default: SecondIndex =
NONE;
break;
20722 nVar_First = solver[FirstIndex]->
GetnVar();
20723 if (SecondIndex !=
NONE) nVar_Second = solver[SecondIndex]->
GetnVar();
20724 nVar_Consv_Par = nVar_First + nVar_Second;
20738 nVar_Par = 1; Variable_Names.push_back(
"x");
20739 nVar_Par += 1; Variable_Names.push_back(
"y");
20740 if (geometry->
GetnDim() == 3) {
20741 nVar_Par += 1; Variable_Names.push_back(
"z");
20747 nVar_Par += nVar_Consv_Par;
20749 Variable_Names.push_back(
"Density");
20750 Variable_Names.push_back(
"X-Momentum");
20751 Variable_Names.push_back(
"Y-Momentum");
20752 if (geometry->
GetnDim() == 3) Variable_Names.push_back(
"Z-Momentum");
20753 Variable_Names.push_back(
"Energy");
20762 Variable_Names.push_back(
"Pressure");
20765 Variable_Names.push_back(
"Temperature");
20767 Variable_Names.push_back(
"Pressure_Coefficient");
20769 Variable_Names.push_back(
"C<sub>p</sub>");
20771 Variable_Names.push_back(
"Mach");
20777 Variable_Names.push_back(
"Laminar_Viscosity");
20781 Variable_Names.push_back(
"Eddy_Viscosity");
20801 Local_Data =
new su2double*[nLocalPoint_Sort];
20802 for (iPoint = 0; iPoint < nLocalPoint_Sort; iPoint++) {
20803 Local_Data[iPoint] =
new su2double[nVar_Par];
20822 for(
unsigned long l=0; l<nVolElemOwned; ++l) {
20829 for(
unsigned short j=0; j<volElem[l].
nDOFsSol; ++j) {
20837 const su2double *U = solDOFs + j*nVar_First;
20842 for(
unsigned short k=0; k<nDim; ++k) {
20843 Local_Data[jPoint][iVar] = coor[k];
20849 for(jVar=0; jVar < nVar_First; ++jVar) {
20850 Local_Data[jPoint][iVar] = U[jVar];
20858 for(iDim=0; iDim<nDim; ++iDim) {
20859 vel[iDim] = U[iDim+1]*DensityInv;
20860 Velocity2 += vel[iDim]*vel[iDim];
20862 su2double StaticEnergy = U[nDim+1]*DensityInv - 0.5*Velocity2;
20867 Local_Data[jPoint][iVar] = DGFluidModel->
GetPressure(); iVar++;
20868 Local_Data[jPoint][iVar] = DGFluidModel->
GetTemperature(); iVar++;
20869 Local_Data[jPoint][iVar] = DGFluidModel->
GetCp(); iVar++;
20870 Local_Data[jPoint][iVar] = sqrt(Velocity2)/DGFluidModel->
GetSoundSpeed(); iVar++;
20893 unsigned long iPoint;
20898 bool fem_solver = ((KindSolver ==
FEM_EULER) ||
20905 nGlobalPoint_Sort = 0;
20906 nLocalPoint_Sort = 0;
20916 unsigned long iVertex;
20919 Local_Halo_Sort =
new int[geometry->
GetnPoint()];
20920 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
20921 Local_Halo_Sort[iPoint] = !geometry->
node[iPoint]->
GetDomain();
20923 for (
unsigned short iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
20929 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
20933 if (isPeriodic) Local_Halo_Sort[iPoint] =
false;
20940 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++)
20941 if (Local_Halo_Sort[iPoint] ==
false)
20942 nLocalPoint_Sort++;
20948 nGlobalPoint_Sort = nLocalPoint_Sort;
20969 for(
unsigned long l=0; l<nVolElemOwned; ++l) {
20973 for(
unsigned short j=0; j<volElem[l].
nDOFsSol; ++j) {
20974 nLocalPoint_Sort++;
20978 Local_Halo_Sort =
new int[nLocalPoint_Sort];
20979 for (iPoint = 0; iPoint < nLocalPoint_Sort; iPoint++)
20980 Local_Halo_Sort[iPoint] =
false;
20986 nGlobalPoint_Sort = nLocalPoint_Sort;
20993 nPoint_Restart = nGlobalPoint_Sort;
21002 beg_node =
new unsigned long[
size];
21003 end_node =
new unsigned long[
size];
21005 nPoint_Lin =
new unsigned long[
size];
21006 nPoint_Cum =
new unsigned long[
size+1];
21008 unsigned long total_points = 0;
21009 for (
int ii = 0; ii <
size; ii++) {
21010 nPoint_Lin[ii] = nGlobalPoint_Sort/
size;
21011 total_points += nPoint_Lin[ii];
21016 unsigned long remainder = nGlobalPoint_Sort - total_points;
21017 for (
unsigned long ii = 0; ii < remainder; ii++) {
21026 end_node[0] = beg_node[0] + nPoint_Lin[0];
21028 for (
int ii = 1; ii <
size; ii++) {
21029 beg_node[ii] = end_node[ii-1];
21030 end_node[ii] = beg_node[ii] + nPoint_Lin[ii];
21031 nPoint_Cum[ii] = nPoint_Cum[ii-1] + nPoint_Lin[ii-1];
21033 nPoint_Cum[
size] = nGlobalPoint_Sort;
21053 cout <<
"Sorting volumetric grid connectivity." << endl;
21069 cout <<
"Sorting surface grid connectivity." << endl;
21079 unsigned long nTotal_Elem = nParallel_Tria + nParallel_Quad + nParallel_Tetr + nParallel_Hexa + nParallel_Pris + nParallel_Pyra;
21080 unsigned long nTotal_Surf_Elem = nParallel_Line + nParallel_BoundTria + nParallel_BoundQuad;
21082 nGlobal_Elem_Par = nTotal_Elem;
21083 nSurf_Elem_Par = nTotal_Surf_Elem;
21101 unsigned long iProcessor;
21102 unsigned long iPoint, Global_Index;
21106 int VARS_PER_POINT = nVar_Par;
21125 vector<unsigned long> globalID;
21128 for(
unsigned long l=0; l<nVolElemOwned; ++l) {
21131 for(
unsigned short j=0; j<volElem[l].
nDOFsSol; ++j) {
21133 globalID.push_back(globalIndex);
21144 int *nPoint_Send =
new int[
size+1]; nPoint_Send[0] = 0;
21145 int *nPoint_Recv =
new int[
size+1]; nPoint_Recv[0] = 0;
21146 int *nPoint_Flag =
new int[
size];
21148 for (
int ii=0; ii <
size; ii++) {
21149 nPoint_Send[ii] = 0;
21150 nPoint_Recv[ii] = 0;
21151 nPoint_Flag[ii]= -1;
21153 nPoint_Send[
size] = 0; nPoint_Recv[
size] = 0;
21155 for (iPoint = 0; iPoint < nLocalPoint_Sort; iPoint++ ) {
21159 Global_Index = globalID[iPoint];
21163 iProcessor = Global_Index/nPoint_Lin[0];
21164 if (iProcessor >= (
unsigned long)
size)
21165 iProcessor = (
unsigned long)
size-1;
21166 if (Global_Index >= nPoint_Cum[iProcessor])
21167 while(Global_Index >= nPoint_Cum[iProcessor+1]) iProcessor++;
21169 while(Global_Index < nPoint_Cum[iProcessor]) iProcessor--;
21174 if (nPoint_Flag[iProcessor] != (
int)iPoint) {
21175 nPoint_Flag[iProcessor] = (int)iPoint;
21176 nPoint_Send[iProcessor+1]++;
21189 nPoint_Recv[1] = nPoint_Send[1];
21197 int nSends = 0, nRecvs = 0;
21198 for (
int ii=0; ii <
size; ii++) nPoint_Flag[ii] = -1;
21200 for (
int ii = 0; ii <
size; ii++) {
21201 if ((ii !=
rank) && (nPoint_Send[ii+1] > 0)) nSends++;
21202 if ((ii !=
rank) && (nPoint_Recv[ii+1] > 0)) nRecvs++;
21204 nPoint_Send[ii+1] += nPoint_Send[ii];
21205 nPoint_Recv[ii+1] += nPoint_Recv[ii];
21211 connSend =
new su2double[VARS_PER_POINT*nPoint_Send[
size]];
21212 for (
int ii = 0; ii < VARS_PER_POINT*nPoint_Send[
size]; ii++)
21217 unsigned long *idSend =
new unsigned long[nPoint_Send[
size]];
21218 for (
int ii = 0; ii < nPoint_Send[
size]; ii++)
21224 unsigned long *index =
new unsigned long[
size];
21225 for (
int ii=0; ii <
size; ii++) index[ii] = VARS_PER_POINT*nPoint_Send[ii];
21227 unsigned long *idIndex =
new unsigned long[
size];
21228 for (
int ii=0; ii <
size; ii++) idIndex[ii] = nPoint_Send[ii];
21233 for (iPoint = 0; iPoint < nLocalPoint_Sort; iPoint++) {
21237 Global_Index = globalID[iPoint];
21241 iProcessor = Global_Index/nPoint_Lin[0];
21242 if (iProcessor >= (
unsigned long)
size)
21243 iProcessor = (
unsigned long)
size-1;
21244 if (Global_Index >= nPoint_Cum[iProcessor])
21245 while(Global_Index >= nPoint_Cum[iProcessor+1]) iProcessor++;
21247 while(Global_Index < nPoint_Cum[iProcessor]) iProcessor--;
21251 if (nPoint_Flag[iProcessor] != (
int)iPoint) {
21253 nPoint_Flag[iProcessor] = (int)iPoint;
21254 unsigned long nn = index[iProcessor];
21258 for (
unsigned short kk = 0; kk < VARS_PER_POINT; kk++) {
21259 connSend[nn] = Local_Data[iPoint][kk]; nn++;
21265 nn = idIndex[iProcessor];
21266 idSend[nn] = Global_Index - beg_node[iProcessor];
21270 index[iProcessor] += VARS_PER_POINT;
21271 idIndex[iProcessor]++;
21288 connRecv =
new su2double[VARS_PER_POINT*nPoint_Recv[
size]];
21289 for (
int ii = 0; ii < VARS_PER_POINT*nPoint_Recv[
size]; ii++)
21292 unsigned long *idRecv =
new unsigned long[nPoint_Recv[
size]];
21293 for (
int ii = 0; ii < nPoint_Recv[
size]; ii++)
21303 unsigned long iMessage = 0;
21304 for (
int ii=0; ii<
size; ii++) {
21305 if ((ii !=
rank) && (nPoint_Recv[ii+1] > nPoint_Recv[ii])) {
21306 int ll = VARS_PER_POINT*nPoint_Recv[ii];
21307 int kk = nPoint_Recv[ii+1] - nPoint_Recv[ii];
21308 int count = VARS_PER_POINT*kk;
21320 for (
int ii=0; ii<
size; ii++) {
21321 if ((ii !=
rank) && (nPoint_Send[ii+1] > nPoint_Send[ii])) {
21322 int ll = VARS_PER_POINT*nPoint_Send[ii];
21323 int kk = nPoint_Send[ii+1] - nPoint_Send[ii];
21324 int count = VARS_PER_POINT*kk;
21326 int tag =
rank + 1;
21336 for (
int ii=0; ii<
size; ii++) {
21337 if ((ii !=
rank) && (nPoint_Recv[ii+1] > nPoint_Recv[ii])) {
21338 int ll = nPoint_Recv[ii];
21339 int kk = nPoint_Recv[ii+1] - nPoint_Recv[ii];
21352 for (
int ii=0; ii<
size; ii++) {
21353 if ((ii !=
rank) && (nPoint_Send[ii+1] > nPoint_Send[ii])) {
21354 int ll = nPoint_Send[ii];
21355 int kk = nPoint_Send[ii+1] - nPoint_Send[ii];
21358 int tag =
rank + 1;
21368 int mm = VARS_PER_POINT*nPoint_Recv[
rank];
21369 int ll = VARS_PER_POINT*nPoint_Send[
rank];
21370 int kk = VARS_PER_POINT*nPoint_Send[
rank+1];
21372 for (
int nn=ll; nn<kk; nn++, mm++) connRecv[mm] = connSend[nn];
21374 mm = nPoint_Recv[
rank];
21375 ll = nPoint_Send[
rank];
21376 kk = nPoint_Send[
rank+1];
21378 for (
int nn=ll; nn<kk; nn++, mm++) idRecv[mm] = idSend[nn];
21383 int number = 2*nSends;
21384 for (
int ii = 0; ii < number; ii++)
21388 for (
int ii = 0; ii < number; ii++)
21391 delete [] send_req;
21392 delete [] recv_req;
21399 Parallel_Data =
new su2double*[VARS_PER_POINT];
21400 for (
int jj = 0; jj < VARS_PER_POINT; jj++) {
21402 for (
int ii = 0; ii < nPoint_Recv[
size]; ii++) {
21403 Parallel_Data[jj][idRecv[ii]] = connRecv[ii*VARS_PER_POINT+jj];
21410 nParallel_Poin = nPoint_Recv[
size];
21415 nGlobal_Poin_Par = nParallel_Poin;
21423 delete [] connSend;
21424 delete [] connRecv;
21427 delete [] nPoint_Recv;
21428 delete [] nPoint_Send;
21429 delete [] nPoint_Flag;
21431 for (iPoint = 0; iPoint < nLocalPoint_Sort; iPoint++)
21432 delete [] Local_Data[iPoint];
21433 delete [] Local_Data;
static void Error(std::string ErrorMsg, std::string FunctionName)
static void Barrier(Comm comm)
static void Gather(void *sendbuf, int sendcnt, Datatype sendtype, void *recvbuf, int recvcnt, Datatype recvtype, int root, Comm comm)
static void Isend(void *buf, int count, Datatype datatype, int dest, int tag, Comm comm, Request *request)
static void Allgather(void *sendbuf, int sendcnt, Datatype sendtype, void *recvbuf, int recvcnt, Datatype recvtype, Comm comm)
static void Allreduce(void *sendbuf, void *recvbuf, int count, Datatype datatype, Op op, Comm comm)
static void Alltoall(void *sendbuf, int sendcount, Datatype sendtype, void *recvbuf, int recvcount, Datatype recvtype, Comm comm)
static void Comm_size(Comm comm, int *size)
static void Waitany(int nrequests, Request *request, int *index, Status *status)
static void Irecv(void *buf, int count, Datatype datatype, int source, int tag, Comm comm, Request *request)
static void Bcast(void *buf, int count, Datatype datatype, int root, Comm comm)
Main class for defining a baseline solution from a restart file (for output).
Class to store a boundary for the FEM solver.
vector< CSurfaceElementFEM > surfElem
Vector of the local surface elements.
Main class for defining the problem; basically this class reads the configuration file,...
su2double GetTemperature_FreeStreamND(void)
Get the value of the non-dimensionalized freestream temperature.
su2double * GetDistortionRack(void)
Get the the coordinates where of the box where a subsonic region is imposed.
unsigned short GetKind_Solver(void)
Governing equations of the flow (it can be different from the run time equation).
void SetCFL(unsigned short val_mesh, su2double val_cfl)
Get the Courant Friedrich Levi number for each grid.
string GetRestart_AdjFEMFileName(void)
Get the name of the restart file for the structural adjoint variables.
su2double * GetRefOriginMoment(unsigned short val_marker)
Get reference origin for moment computation.
unsigned short GetiInst(void)
Get the current instance.
su2double * GetVelocity_FreeStreamND(void)
Get the vector of the non-dimensionalized freestream velocity.
su2double GetSurface_MassFlow(unsigned short val_imarker)
Get the massflow at an outlet boundary.
su2double GetNuFactor_FreeStream(void)
Get the value of the non-dimensionalized freestream turbulence intensity.
void SetSurface_IDC_Mach(unsigned short val_imarker, su2double val_surface_distortion)
Get the back pressure (static) at an outlet boundary.
unsigned short GetDirectDiff()
Get the direct differentation method.
unsigned short GetnMarker_Analyze(void)
Get the total number of moving markers.
bool GetWrt_Crd_Sol(void)
Get information about writing a binary coordinates file.
void SetSurface_PressureDrop(unsigned short val_imarker, su2double val_surface_pressuredrop)
Set the pressure drop between two surfaces.
su2double GetEnergy_Ref(void)
Get the value of the reference pressure for non-dimensionalization.
su2double GetPressureOut_BC()
Get the outlet pressure imposed as BC for internal flow.
void SetSurface_Enthalpy(unsigned short val_imarker, su2double val_surface_enthalpy)
Set the enthalpy at the surface.
unsigned long GetFSIIter(void)
Get the current FSI iteration number.
su2double * GetInlet_FlowDir(string val_index)
Get the flow direction unit vector at an inlet boundary.
bool GetExtraOutput(void)
Creates a tecplot file to visualize the partition made by the DDC software.
su2double GetEA_IntLimit(unsigned short index)
Get the integration limits for the equivalent area computation.
su2double GetSurface_DC60(unsigned short val_imarker)
Get the back pressure (static) at an outlet boundary.
su2double GetdCD_dCL(void)
Value of the weight of the CD, CL, CM optimization.
su2double GetInitial_BCThrust(void)
Get the value of the non-dimensionalized actuator disk turbulence intensity.
su2double GetdCMy_dCL(void)
Value of the weight of the CD, CL, CM optimization.
void SetSurface_Density(unsigned short val_imarker, su2double val_surface_density)
Set the density at the surface.
string GetMultizone_HistoryFileName(string val_filename, int val_iZone)
Append the zone index to the restart or the solution files.
bool GetContinuous_Adjoint(void)
Determines if problem is adjoint.
string GetMultiInstance_HistoryFileName(string val_filename, int val_iInst)
Append the instance index to the restart or the solution files.
bool GetInvDesign_HeatFlux(void)
Information about computing and plotting the equivalent area distribution.
unsigned short GetKind_ObjFunc(void)
Get the kind of objective function. There are several options: Drag coefficient, Lift coefficient,...
unsigned short GetKind_HybridRANSLES(void)
Get the Kind of Hybrid RANS/LES.
bool GetWrt_Residuals(void)
Get information about writing residuals to volume solution file.
unsigned short GetnTimeInstances(void)
Retrieves the number of periodic time instances for Harmonic Balance.
bool GetViscous(void)
Determines if problem is viscous.
su2double GetInlet_Ptotal(string val_index)
Get the total pressure at an inlet boundary.
unsigned short GetnMarker_All(void)
Get the total number of boundary markers.
su2double GetInc_Velocity_Ref(void)
Get the value of the reference velocity for custom incompressible non-dimensionalization.
unsigned long GetExtIter_OffSet(void)
Get the current internal iteration number.
unsigned long GetIter_dCL_dAlpha(void)
Number of iterations to evaluate dCL_dAlpha.
su2double GetSurface_IDR(unsigned short val_imarker)
Get the back pressure (static) at an outlet boundary.
unsigned short GetKind_Trans_Model(void)
Get the kind of the transition model.
su2double GetSurface_Temperature(unsigned short val_imarker)
Get the temperature at an outlet boundary.
su2double GetPressure_Ref(void)
Get the value of the reference pressure for non-dimensionalization.
unsigned short GetRef_Inc_NonDim(void)
Get the kind of incompressible non-dimensionalization.
bool GetWrt_Halo(void)
Get information about writing rind layers to the solution files.
su2double GetAoS_Offset(void)
Get the off set sideslip angle of the body. The solution and the geometry file are able to modifity t...
unsigned short GetKind_Turb_Model(void)
Get the kind of the turbulence model.
su2double GetAoS(void)
Get the angle of sideslip of the body. It relates to the rotation of the aircraft centerline from the...
su2double GetReynolds(void)
Get the Reynolds number. Dimensionless number that gives a measure of the ratio of inertial forces to...
unsigned short GetUnsteady_Simulation(void)
Provides information about the time integration, and change the write in the output files information...
unsigned short GetKind_SU2(void)
Get the kind of SU2 software component.
bool GetInvDesign_Cp(void)
Information about computing and plotting the equivalent area distribution.
long GetExtraHeatOutputZone(void)
Heat solver zone with extra screen output.
su2double GetSurface_Mach(unsigned short val_imarker)
Get the mach number at an outlet boundary.
unsigned short GetnMarker_ActDiskInlet(void)
Get the total number of boundary markers.
su2double GetSurface_IDC_Mach(unsigned short val_imarker)
Get the back pressure (static) at an outlet boundary.
void SetWrt_InletFile(bool val_wrt_inletfile)
Set information about writing a template inlet profile file.
bool GetVisualize_Surface_Def(void)
Creates a teot file to visualize the surface deformation deformation made by the DEF software.
bool GetIncrementalLoad(void)
Check if we want to apply an incremental load to the nonlinear structural simulation.
su2double GetSurface_SecondaryStrength(unsigned short val_imarker)
Get the secondary flow strength at the surface.
unsigned short GetnMarker_Transpiration(void)
Get the total number of transpiration markers.
bool GetWrt_Dynamic(void)
Get information about writing dynamic structural analysis headers and file extensions.
su2double GetdCMx_dCL(void)
Value of the weight of the CD, CL, CM optimization.
unsigned short GetMarker_All_KindBC(unsigned short val_marker)
Get the kind of boundary for each marker.
void SetSurface_Uniformity(unsigned short val_imarker, su2double val_surface_streamwiseuniformity)
Set the streamwise flow uniformity at the surface.
vector< string > fields
Tags for the different fields in a restart file.
su2double GetPressure_FreeStreamND(void)
Get the value of the non-dimensionalized freestream pressure.
su2double GetCFL(unsigned short val_mesh)
Get the Courant Friedrich Levi number for each grid.
bool GetRotating_Frame(void)
Get information about the rotational frame.
string GetMarker_Monitoring_TagBound(unsigned short val_marker)
Get the name of the surface defined in the geometry file.
bool GetBoolTurbomachinery(void)
Verify if there is Turbomachinery performance option specified from config file.
bool GetAeroelastic_Simulation(void)
Get information about the aeroelastic simulation.
unsigned short GetKind_SGS_Model(void)
Get the kind of the subgrid scale model.
void SetSurface_NormalVelocity(unsigned short val_imarker, su2double val_surface_normalvelocity)
Set the normal velocity at the surface.
su2double GetGamma(void)
Get the value of the Gamma of fluid (ratio of specific heats).
unsigned short GetnSpanMaxAllZones(void)
number span-wise sections to compute performance for turbomachinery.
su2double GetAoA(void)
Get the angle of attack of the body. This is the angle between a reference line on a lifting body (of...
su2double GetMach(void)
Get the value of the Mach number (velocity divided by speed of sound).
unsigned short GetnMarker_Monitoring(void)
Get the total number of monitoring markers.
bool GetWrt_SharpEdges(void)
Get information about writing residuals to volume solution file.
su2double GetdCMz_dCL(void)
Value of the weight of the CD, CL, CM optimization.
unsigned short GetKind_ConvNumScheme(void)
Get the kind of convective numerical scheme.
su2double GetRefLength(void)
Get the reference length for computing moment (the default value is 1).
bool GetGrid_Movement(void)
Get information about the grid movement.
su2double GetInlet_Ttotal(string val_index)
Get the total temperature at an inlet boundary.
su2double GetSemiSpan(void)
Get the wing semi span.
bool GetWrt_Csv_Sol(void)
Get information about writing a surface comma-separated values (CSV) solution file.
unsigned short GetKind_Regime(void)
Governing equations of the flow (it can be different from the run time equation).
su2double GetAoA_Offset(void)
Get the off set angle of attack of the body. The solution and the geometry file are able to modifity ...
bool GetGravityForce(void)
Get information about the gravity force.
unsigned short GetKind_DensityModel(void)
Option to define the density model for incompressible flows.
void SetSurface_MomentumDistortion(unsigned short val_imarker, su2double val_surface_momentumdistortion)
Set the momentum distortion at the surface.
su2double GetFlowAngleIn_BC()
Get the inlet flow angle imposed as BC for internal flow.
su2double GetGas_ConstantND(void)
Get the value of specific gas constant.
void SetiInst(unsigned short val_iInst)
Set the current instance.
unsigned short GetnMarker_ActDiskOutlet(void)
Get the total number of boundary markers.
string GetSurfAdjCoeff_FileName(void)
Get the name of the file with the surface information for the adjoint problem.
void SetSurface_TotalPressure(unsigned short val_imarker, su2double val_surface_totalpressure)
Set the total pressure at the surface.
su2double GetEA_ScaleFactor(void)
Get the integration limits for the equivalent area computation.
su2double GetSurface_Pressure(unsigned short val_imarker)
Get the pressure at an outlet boundary.
unsigned short GetnMarker_EngineInflow(void)
Get the total number of boundary markers.
short GetMarker_All_SendRecv(unsigned short val_marker)
Get the send-receive information for a marker val_marker.
su2double GetSurface_IDC(unsigned short val_imarker)
Get the back pressure (static) at an outlet boundary.
bool GetEngine_HalfModel(void)
Only halg of the engine is in the compputational grid.
void SetSurface_SecondOverUniform(unsigned short val_imarker, su2double val_surface_secondaryoverstream)
Set the relative secondary flow strength at the surface.
bool GetWrt_Vol_Sol(void)
Get information about writing a volume solution file.
su2double GetSurface_TotalTemperature(unsigned short val_imarker)
Get the total temperature at an outlet boundary.
void SetSurface_Temperature(unsigned short val_imarker, su2double val_surface_temperature)
Set the temperature at the surface.
void SetSurface_TotalTemperature(unsigned short val_imarker, su2double val_surface_totaltemperature)
Set the total temperature at the surface.
void SetSurface_SecondaryStrength(unsigned short val_imarker, su2double val_surface_secondarystrength)
Set the secondary flow strength at the surface.
unsigned short GetMarker_All_Plotting(unsigned short val_marker)
Get the plotting information for a marker val_marker.
su2double GetMach_Motion(void)
Get the mach number based on the mesh velocity and freestream quantities.
unsigned short GetMarker_All_Analyze(unsigned short val_marker)
Get the plotting information for a marker val_marker.
unsigned short GetnLocationStations(void)
Get the number of sections.
su2double GetDensity_Ref(void)
Get the value of the reference density for non-dimensionalization.
su2double GetSurface_Density(unsigned short val_imarker)
Get the density at an outlet boundary.
su2double GetFixAzimuthalLine(void)
Value of the azimuthal line to fix due to a misalignments of the nearfield.
su2double GetTemperature_Ref(void)
Get the value of the reference temperature for non-dimensionalization.
unsigned short GetnMarker_Turbomachinery(void)
number Turbomachinery performance option specified from config file.
su2double GetVelocity_Ref(void)
Get the value of the reference velocity for non-dimensionalization.
string GetMarker_TurboPerf_BoundIn(unsigned short index)
get inlet bounds name for Turbomachinery performance calculation.
string GetUnsteady_FileName(string val_filename, int val_iter)
Augment the input filename with the iteration number for an unsteady file.
unsigned short GetKind_Average(void)
Get the kind of marker analyze marker (area-averaged, mass flux averaged, etc).
su2double GetSurface_SecondOverUniform(unsigned short val_imarker)
Get the relative secondary flow strength at the surface.
string GetMesh_Out_FileName(void)
Get name of the output grid, this parameter is important for grid adaptation and deformation.
string GetMarker_All_TagBound(unsigned short val_marker)
Get the index of the surface defined in the geometry file.
bool GetFSI_Simulation(void)
Check if the simulation we are running is a FSI simulation.
string GetMarker_Analyze_TagBound(unsigned short val_marker)
Get the name of the surface defined in the geometry file.
static unsigned short GetnZone(string val_mesh_filename, unsigned short val_format, CConfig *config)
Gets the number of zones in the mesh file.
void SetRestart_Bandwidth_Agg(su2double val_restart_bandwidth_sum)
Set the sum of the bandwidth for writing binary restarts (to be averaged later).
string GetRestart_AdjFileName(void)
Get the name of the restart file for the adjoint variables (drag objective function).
unsigned short GetnMarker_TurboPerformance(void)
number Turbomachinery performance option specified from config file.
string GetConv_FileName(void)
Get the name of the file with the convergence history of the problem.
su2double GetSurface_TotalPressure(unsigned short val_imarker)
Get the total pressure at an outlet boundary.
su2double GetNacelleLocation(unsigned short val_index)
Get the defintion of the nacelle location.
void SetSurface_DC60(unsigned short val_imarker, su2double val_surface_distortion)
Get the back pressure (static) at an outlet boundary.
su2double GetPressure_ThermodynamicND(void)
Get the value of the non-dimensionalized thermodynamic pressure.
unsigned short GetnSpan_iZones(unsigned short iZone)
set number span-wise sections to compute 3D BC and performance for turbomachinery.
unsigned short GetGeo_Description(void)
Get Description of the geometry to be analyzed.
unsigned long GetExtIter(void)
Get the current external iteration number.
void SetSurface_Pressure(unsigned short val_imarker, su2double val_surface_pressure)
Set the pressure at the surface.
su2double GetSurface_NormalVelocity(unsigned short val_imarker)
Get the normal velocity at an outlet boundary.
bool GetWrt_Unsteady(void)
Get information about writing unsteady headers and file extensions.
unsigned short GetRef_NonDim(void)
Get the kind of non-dimensionalization.
long GetUnst_RestartIter(void)
Get the restart iteration number for unsteady simulations.
su2double GetTurb2LamViscRatio_FreeStream(void)
Get the value of the turbulent to laminar viscosity ratio.
unsigned short GetnObj(void)
Get the total number of objectives in kind_objective list.
unsigned short GetnMarker_EngineExhaust(void)
Get the total number of boundary markers.
unsigned long GetIntIter(void)
Get the current internal iteration number.
bool GetEnergy_Equation(void)
Flag for whether to solve the energy equation for incompressible flows.
bool GetVisualize_Volume_Def(void)
Creates a tecplot file to visualize the volume deformation deformation made by the DEF software.
bool GetFixed_CL_Mode(void)
Get information about whether to use fixed CL mode.
bool GetDiscrete_Adjoint(void)
Get the indicator whether we are solving an discrete adjoint problem.
unsigned short GetGeometricConditions(void)
Geometric conditions for the structural solver.
unsigned short GetDynamic_Analysis(void)
Provides information about the time integration of the structural analysis, and change the write in t...
unsigned short GetOutput_FileFormat(void)
Get the format of the output solution.
su2double GetCFL_AdaptParam(unsigned short val_index)
Get the values of the CFL adapation.
su2double GetStations_Bounds(unsigned short val_var)
Get the value of the limits for the sections.
string GetRestart_FEMFileName(void)
Get the name of the restart file for the structural variables.
unsigned short GetKind_RoeLowDiss(void)
Get the Kind of Roe Low Dissipation Scheme for Unsteady flows.
bool GetAxisymmetric(void)
Get information about the axisymmetric frame.
su2double GetInc_Density_Ref(void)
Get the value of the reference density for custom incompressible non-dimensionalization.
bool GetWrt_Limiters(void)
Get information about writing residuals to volume solution file.
su2double GetTurbulenceIntensity_FreeStream(void)
Get the value of the non-dimensionalized freestream turbulence intensity.
string GetRestart_FlowFileName(void)
Get the name of the restart file for the flow variables.
su2double GetSurface_MomentumDistortion(unsigned short val_imarker)
Get the momentum distortion at the surface.
string GetConv_FileName_FSI(void)
Get the name of the file with the convergence history of the problem for FSI applications.
string GetMarker_TurboPerf_BoundOut(unsigned short index)
get outlet bounds name for Turbomachinery performance calculation.
void SetSurface_Mach(unsigned short val_imarker, su2double val_surface_mach)
Set the mach number at the surface.
string GetSurfFlowCoeff_FileName(void)
Get the name of the file with the surface information for the flow problem.
su2double GetBulk_Modulus(void)
Get the value of the bulk modulus.
su2double GetRefArea(void)
Get the reference area for non dimensional coefficient computation. If the value from the is 0 then,...
string GetBreakdown_FileName(void)
Get the name of the file with the forces breakdown of the problem.
void SetSurface_IDR(unsigned short val_imarker, su2double val_surface_distortion)
Get the back pressure (static) at an outlet boundary.
string GetMultiInstance_FileName(string val_filename, int val_iInst)
Append the instance index to the restart or the solution files.
string GetObjFunc_Extension(string val_filename)
Append the input filename string with the appropriate objective function extension.
void SetSurface_IDC(unsigned short val_imarker, su2double val_surface_distortion)
Get the back pressure (static) at an outlet boundary.
void SetSurface_MassFlow(unsigned short val_imarker, su2double val_surface_massflow)
Set the massflow at the surface.
bool GetWeakly_Coupled_Heat(void)
Get the heat equation.
bool GetFrozen_Visc_Disc(void)
Provides information about the way in which the turbulence will be treated by the disc....
su2double GetLocationStations(unsigned short val_section)
Get the airfoil sections in the slicing process.
bool GetRestart(void)
Provides the restart information.
su2double GetRestart_Bandwidth_Agg(void)
Set the sum of the bandwidth for writing binary restarts (to be averaged later).
unsigned short GetnMGLevels(void)
Get the number of multigrid levels.
bool GetFrozen_Visc_Cont(void)
Provides information about the way in which the turbulence will be treated by the cont....
bool GetWrt_Performance(void)
Get information about writing the performance summary at the end of a calculation.
string GetMultizone_FileName(string val_filename, int val_iZone)
Append the zone index to the restart or the solution files.
bool GetBuffet_Monitoring(void)
Provides the buffet monitoring information.
bool GetWrt_Srf_Sol(void)
Get information about writing a surface solution file.
unsigned short GetFinestMesh(void)
Get the index of the finest grid.
bool GetWrt_Surface(void)
Write solution at each surface.
bool GetLow_MemoryOutput(void)
Get information about writing a volume solution file.
unsigned short GetSystemMeasurements(void)
Governing equations of the flow (it can be different from the run time equation).
bool GetEquivArea(void)
Information about computing and plotting the equivalent area distribution.
su2double GetSurface_Uniformity(unsigned short val_imarker)
Get the streamwise flow uniformity at the surface.
Class to define a FEM standard boundary face.
unsigned short GetNSubFaces(void) const
Function, which makes available the number of linear subfaces used for plotting, among others.
unsigned short GetNDOFsPerSubFace(void) const
Function, which makes available the number of DOFs of a linear subface, used for plotting,...
const unsigned short * GetSubFaceConn(void) const
Function, which makes available the the connectivity of the linear subfaces as a const pointer.
unsigned short GetVTK_Type(void) const
Function, which makes available the type of the element.
Class to define a FEM standard element.
const unsigned short * GetSubConnType2(void) const
Function, which makes available the the connectivity of the linear elements of type 2 as a const poin...
unsigned short GetNSubElemsType1(void) const
Function, which makes available the number of sub-elements of type 1 for plotting.
const unsigned short * GetSubConnType1(void) const
Function, which makes available the the connectivity of the linear elements of type 1 as a const poin...
unsigned short GetVTK_Type2(void) const
Function, which makes available the type of the element in subConn2ForPlotting.
unsigned short GetNDOFsPerSubElem(unsigned short val_VTK_Type) const
Function, which makes available the number of DOFs of a linear element, used for plotting.
unsigned short GetNSubElemsType2(void) const
Function, which makes available the number of sub-elements of type 2 for plotting.
unsigned short GetVTK_Type1(void) const
Function, which makes available the type of the element in subConn1ForPlotting.
Main class for defining the Thermo-Physical Model a child class for each particular Model (Ideal-Gas,...
su2double GetCp()
Get fluid specific heat at constant pressure.
su2double GetPressure()
Get fluid pressure.
su2double GetSoundSpeed()
Get fluid speed of sound.
virtual void SetTDState_rhoe(su2double rho, su2double e)
virtual member that would be different for each gas model implemented
su2double GetLaminarViscosity()
Get fluid dynamic viscosity.
su2double GetTemperature()
Get fluid temperature.
Parent class for defining the geometry of the problem (complete geometry, multigrid agglomerated geom...
void ComputeAirfoil_Section(su2double *Plane_P0, su2double *Plane_Normal, su2double MinXCoord, su2double MaxXCoord, su2double MinYCoord, su2double MaxYCoord, su2double MinZCoord, su2double MaxZCoord, su2double *FlowVariable, vector< su2double > &Xcoord_Airfoil, vector< su2double > &Ycoord_Airfoil, vector< su2double > &Zcoord_Airfoil, vector< su2double > &Variable_Airfoil, bool original_surface, CConfig *config)
A virtual member.
virtual unsigned long GetGlobal_nPointDomain()
A virtual member.
virtual unsigned long GetnElemPris()
A virtual member.
unsigned short GetnDim(void)
Get number of coordinates.
CPrimalGrid *** bound
Boundary vector (primal grid information).
unsigned long GetnElem(void)
Get number of elements.
unsigned long GetnElem_Bound(unsigned short val_marker)
Get the number of boundary elements.
unsigned long GetnPointDomain(void)
Get number of real points (that belong to the domain).
unsigned long GetnVertex(unsigned short val_marker)
Get number of vertices.
CVertex *** vertex
Boundary Vertex vector (dual grid information).
virtual unsigned long GetnElemHexa()
A virtual member.
virtual su2double GetSensitivity(unsigned long iPoint, unsigned short iDim)
A virtual member.
virtual unsigned long GetnElemTria()
A virtual member.
su2double * GetSpanWiseValue(unsigned short val_marker)
Get number of vertices.
unsigned short GetnZone(void)
Get number of zones.
unsigned long GetnPoint(void)
Get number of points.
virtual unsigned long GetnElemQuad()
A virtual member.
virtual unsigned long GetnElemPyra()
A virtual member.
CPrimalGrid ** elem
Element vector (primal grid information).
virtual unsigned long GetnElemTetr()
A virtual member.
CPoint ** node
Node vector (dual grid information).
unsigned long * nVertex
Number of vertex for each marker.
Main class for doing the space integration, time integration, and monitoring of a system of Partial D...
Class which contains all the variables for the DG FEM solver.
CFEMStandardElement * GetStandardElementsSol(void)
Function, which makes available the standard volume elements of the solution.
unsigned long GetNVolElemOwned(void)
Function, which makes available the number of owned volume elements in the local FEM mesh.
CVolumeElementFEM * GetVolElem(void)
Function, which makes available the volume elements in the local FEM mesh.
CBoundaryFEM * GetBoundaries(void)
Function, which makes available the boundaries of the local FEM mesh.
CFEMStandardBoundaryFace * GetStandardBoundaryFacesSol(void)
Function, which makes available the standard boundary faces of the solution.
void MergeVolumetricConnectivity_FEM(CConfig *config, CGeometry *geometry, unsigned short Elem_Type)
Merge the connectivity for a single element type from all processors for the FEM solver.
void SortOutputData_FEM(CConfig *config, CGeometry *geometry)
Sort the output data for each grid node into a linear partitioning across all processors (DG-FEM solv...
void SetParaview_ASCII(CConfig *config, CGeometry *geometry, unsigned short val_iZone, unsigned short val_nZone, bool surf_sol)
Write a Paraview ASCII solution file.
void WriteTecplotASCII_Parallel(CConfig *config, CGeometry *geometry, CSolver **solver, unsigned short val_iZone, unsigned short val_nZone, unsigned short val_iInst, unsigned short val_nInst, bool surf_sol)
Write the solution data and connectivity to a Tecplot ASCII mesh file in parallel.
void SetTecplotBinary_SurfaceSolution(CConfig *config, CGeometry *geometry, unsigned short val_iZone)
Write solution data to a Tecplot binary surface solution file.
void DeallocateInletCoordinates(CConfig *config, CGeometry *geometry)
Deallocate temporary memory needed for merging and writing inlet boundary coordinates.
void LoadLocalData_Base(CConfig *config, CGeometry *geometry, CSolver **solver, unsigned short val_iZone)
Load the desired solution data into a structure used for parallel reordering and output file writing ...
void SortVolumetricConnectivity(CConfig *config, CGeometry *geometry, unsigned short Elem_Type)
Sort the connectivity for a single volume element type into a linear partitioning across all processo...
void SetTecplotASCII(CConfig *config, CGeometry *geometry, CSolver **solver, unsigned short val_iZone, unsigned short val_nZone, bool surf_sol)
Write a Tecplot ASCII solution file.
void SortOutputData(CConfig *config, CGeometry *geometry)
Sort the output data for each grid node into a linear partitioning across all processors.
void SetMesh_Files(CGeometry **geometry, CConfig **config, unsigned short val_nZone, bool new_file, bool su2_file)
Writes and organizes the all the output files, except the history one, for serial computations.
void WriteParaViewBinary_Parallel(CConfig *config, CGeometry *geometry, CSolver **solver, unsigned short val_iZone, unsigned short val_nZone, bool surf_sol)
Write a Paraview binary solution file with parallel output.
void SetSTL_MeshASCII(CConfig *config, CGeometry *geometry)
Write the nodal coordinates and connectivity to a stl ASCII mesh file.
void MergeCoordinates(CConfig *config, CGeometry *geometry)
Merge the node coordinates from all processors.
void SortSurfaceConnectivity_FEM(CConfig *config, CGeometry *geometry, unsigned short Elem_Type)
Sort the connectivity for a single surface element type into a linear partitioning across all process...
void DeallocateSolution(CConfig *config, CGeometry *geometry)
Deallocate temporary memory needed for merging and writing solution variables.
void LoadLocalData_Flow(CConfig *config, CGeometry *geometry, CSolver **solver, unsigned short val_iZone)
Load the desired solution data into a structure used for parallel reordering and output file writing ...
void SpecialOutput_Distortion(CSolver *solver, CGeometry *geometry, CConfig *config, bool output)
Create and write the file with the flow coefficient on the surface.
void SetResult_Files(CSolver *****solver_container, CGeometry ****geometry, CConfig **config, unsigned long iExtIter, unsigned short val_nZone)
Writes and organizes the all the output files, except the history one, for serial computations.
void SortSurfaceConnectivity(CConfig *config, CGeometry *geometry, unsigned short Elem_Type)
Sort the connectivity for a single surface element type into a linear partitioning across all process...
void SetConvHistory_Body(ofstream *ConvHist_file, CGeometry ****geometry, CSolver *****solver_container, CConfig **config, CIntegration ****integration, bool DualTime, su2double timeused, unsigned short val_iZone, unsigned short val_iInst)
Write the history file and the convergence on the screen for serial computations.
void LoadLocalData_FEM(CConfig *config, CGeometry *geometry, CSolver **solver, unsigned short val_iZone)
Load the desired solution data into a structure used for parallel reordering and output file writing ...
void SortVolumetricConnectivity_FEM(CConfig *config, CGeometry *geometry, unsigned short Elem_Type)
Sort the connectivity for a single volume element type into a linear partitioning across all processo...
void SetCSV_MeshASCII(CConfig *config, CGeometry *geometry)
Write the nodal coordinates and connectivity to a n3d ASCII mesh file.
void SetFieldViewBinary(CConfig *config, CGeometry *geometry, unsigned short val_iZone, unsigned short val_nZone)
Write solution data to a Tecplot binary volume solution file.
void MergeBaselineSolution(CConfig *config, CGeometry *geometry, CSolver *solver, unsigned short val_iZone)
Merge the solution into a data structure used for output file writing.
void MergeVolumetricConnectivity(CConfig *config, CGeometry *geometry, unsigned short Elem_Type)
Merge the connectivity for a single element type from all processors.
void MergeSurfaceConnectivity(CConfig *config, CGeometry *geometry, unsigned short Elem_Type)
Merge the connectivity for a single element type from all processors.
void SetParaview_MeshASCII(CConfig *config, CGeometry *geometry, unsigned short val_iZone, unsigned short val_nZone, bool surf_sol, bool new_file)
Write a Paraview ASCII solution file.
~COutput(void)
Destructor of the class.
void SetTecplotBinary_DomainSolution(CConfig *config, CGeometry *geometry, unsigned short val_iZone)
Write solution data to a Tecplot binary volume solution file.
void PrepareOffsets(CConfig *config, CGeometry *geometry)
Prepare the number of points and offsets for linear partitioning that are needed for output.
void MergeSurfaceConnectivity_FEM(CConfig *config, CGeometry *geometry, unsigned short Elem_Type)
Merge the connectivity for a single element type from all processors for the FEM solver.
void DeallocateSurfaceData_Parallel(CConfig *config, CGeometry *geometry)
Deallocate temporary memory needed for merging and writing output data in parallel.
void SpecialOutput_SpanLoad(CSolver *solver, CGeometry *geometry, CConfig *config, bool output)
Writes forces at different sections.
void SetTecplotBinary_SurfaceMesh(CConfig *config, CGeometry *geometry, unsigned short val_iZone)
Write the coordinates and connectivity to a Tecplot binary surface mesh file.
void WriteRestart_Parallel_Binary(CConfig *config, CGeometry *geometry, CSolver **solver, unsigned short val_iZone, unsigned short val_iInst)
Write a native SU2 restart file (binary) in parallel.
void SetResult_Files_FEM(CSolver ****solver_container, CGeometry ***geometry, CConfig **config, unsigned long iExtIter, unsigned short val_nZone)
Writes and organizes the all the output files, except the history one, for serial computations with t...
void SetRestart(CConfig *config, CGeometry *geometry, CSolver **solver, unsigned short val_iZone)
Write a native SU2 restart file.
void MergeSolution_FEM(CConfig *config, CGeometry *geometry, CSolver **solver, unsigned short val_iZone)
Merge the FEM solution into a data structure used for output file writing.
void MergeConnectivity_FEM(CConfig *config, CGeometry *geometry, unsigned short val_iZone)
Merge the FEM geometry into a data structure used for output file writing.
void DeallocateConnectivity(CConfig *config, CGeometry *geometry, bool surf_sol)
Deallocate temporary memory needed for merging and writing connectivity.
void SetCFL_Number(CSolver *****solver_container, CConfig **config, unsigned short val_iZone)
Write the history file and the convergence on the screen for serial computations.
void SortOutputData_Surface_FEM(CConfig *config, CGeometry *geometry)
Sort the surface output data for each grid node into a linear partitioning across all processors (DG-...
void SetHeatFlux_InverseDesign(CSolver *solver_container, CGeometry *geometry, CConfig *config, unsigned long iExtIter)
Writes inverse design.
void SpecialOutput_Turbo(CSolver *****solver_container, CGeometry ****geometry, CConfig **config, unsigned short val_iZone, bool output)
Write the output file for spanwise turboperformance.
void WriteTurboPerfConvHistory(CConfig *config)
Compute .
void WriteParaViewASCII_Parallel(CConfig *config, CGeometry *geometry, CSolver **solver, unsigned short val_iZone, unsigned short val_nZone, unsigned short val_iInst, unsigned short val_nInst, bool surf_sol)
Write a Paraview ASCII solution file with parallel output.
void MergeInletCoordinates(CConfig *config, CGeometry *geometry)
Merge the node coordinates of all inlet boundaries from all processors.
void SetTecplotBinary_DomainMesh(CConfig *config, CGeometry *geometry, unsigned short val_iZone)
Write the nodal coordinates and connectivity to a Tecplot binary mesh file.
void DeallocateCoordinates(CConfig *config, CGeometry *geometry)
Deallocate temporary memory needed for merging and writing coordinates.
void DeallocateData_Parallel(CConfig *config, CGeometry *geometry)
Deallocate temporary memory needed for merging and writing output data in parallel.
void MergeBaselineSolution_FEM(CConfig *config, CGeometry *geometry, CSolver *solver, unsigned short val_iZone)
Merge the solution into a data structure used for output file writing (DG-FEM).
void SetResult_Files_Parallel(CSolver *****solver_container, CGeometry ****geometry, CConfig **config, unsigned long iExtIter, unsigned short val_nZone, unsigned short *nInst)
Writes and organizes the all the output files, except the history one, for parallel computations.
void MergeConnectivity(CConfig *config, CGeometry *geometry, unsigned short val_iZone)
Merge the geometry into a data structure used for output file writing.
void LoadLocalData_Elasticity(CConfig *config, CGeometry *geometry, CSolver **solver, unsigned short val_iZone)
Load the desired solution data into a structure used for parallel reordering and output file writing ...
void SortConnectivity(CConfig *config, CGeometry *geometry, unsigned short val_iZone)
Sort the connectivities (volume and surface) into data structures used for output file writing.
void Write_InletFile_Flow(CConfig *config, CGeometry *geometry, CSolver **solver)
Write a template inlet profile file for all inlets for flow problems.
void SpecialOutput_SonicBoom(CSolver *solver, CGeometry *geometry, CConfig *config, bool output)
Writes equivalent area.
void SetSurfaceCSV_Flow(CConfig *config, CGeometry *geometry, CSolver *FlowSolver, unsigned long iExtIter, unsigned short val_iZone, unsigned short val_iInst)
Create and write the file with the flow coefficient on the surface.
void SetSensitivity_Files(CGeometry **geometry, CConfig **config, unsigned short val_nZone)
Write the sensitivity (including mesh sensitivity) computed with the discrete adjoint method on the s...
void SortConnectivity_FEM(CConfig *config, CGeometry *geometry, unsigned short val_iZone)
Sort the connectivities (volume and surface) into data structures used for output file writing (DG-FE...
void SetConvHistory_Header(ofstream *ConvHist_file, CConfig *config, unsigned short val_iZone, unsigned short val_iInst)
Write the header of the history file.
void SetFieldViewASCII(CConfig *config, CGeometry *geometry, unsigned short val_iZone, unsigned short val_nZone)
Write a Tecplot ASCII solution file.
void SetTecplotASCII_Mesh(CConfig *config, CGeometry *geometry, unsigned short val_iZone, bool surf_sol, bool new_file)
Write the nodal coordinates and connectivity to a n3d ASCII mesh file.
void WriteCoordinates_Binary(CConfig *config, CGeometry *geometry, unsigned short val_iZone)
Write the nodal coordinates to a binary file.
void WriteCSV_Slice(CConfig *config, CGeometry *geometry, CSolver *FlowSolver, unsigned long iExtIter, unsigned short val_iZone, unsigned short val_direction)
Create and write a CSV file with a slice of data.
COutput(CConfig *congig)
Constructor of the class.
void WriteRestart_Parallel_ASCII(CConfig *config, CGeometry *geometry, CSolver **solver, unsigned short val_iZone, unsigned short val_iInst)
Write a native SU2 restart file (ASCII) in parallel.
void SortOutputData_Surface(CConfig *config, CGeometry *geometry)
Sort the surface output data for each grid node into a linear partitioning across all processors.
void SetBaselineResult_Files(CSolver ***solver, CGeometry ***geometry, CConfig **config, unsigned long iExtIter, unsigned short val_nZone)
Writes and organizes the all the output files, except the history one, for serial computations.
void SpecialOutput_HarmonicBalance(CSolver *****solver, CGeometry ****geometry, CConfig **config, unsigned short iZone, unsigned short val_nZone, bool output)
Write the output file for harmonic balance for each time-instance.
void SetCp_InverseDesign(CSolver *solver_container, CGeometry *geometry, CConfig *config, unsigned long iExtIter)
Writes inverse design.
void SetBaselineResult_Files_FEM(CSolver ***solver, CGeometry ***geometry, CConfig **config, unsigned long iExtIter, unsigned short val_nZone)
Writes and organizes the all the output files, except the history one, for DG-FEM simulations (SU2_SO...
void SpecialOutput_FSI(ofstream *FSIHist_file, CGeometry ****geometry, CSolver *****solver_container, CConfig **config, CIntegration ****integration, unsigned long iExtIter, unsigned short ZONE_FLOW, unsigned short ZONE_STRUCT, bool header)
Create and write the file with the FSI convergence history.
void LoadLocalData_AdjFlow(CConfig *config, CGeometry *geometry, CSolver **solver, unsigned short val_iZone)
Load the desired solution data into a structure used for parallel reordering and output file writing ...
void SpecialOutput_AnalyzeSurface(CSolver *solver, CGeometry *geometry, CConfig *config, bool output)
Writes one dimensional output.
void MergeSolution(CConfig *config, CGeometry *geometry, CSolver **solver, unsigned short val_iZone)
Merge the solution into a data structure used for output file writing.
void SpecialOutput_ForcesBreakdown(CSolver *****solver, CGeometry ****geometry, CConfig **config, unsigned short val_iZone, bool output)
Write the history file and the convergence on the screen for serial computations.
void DeallocateConnectivity_Parallel(CConfig *config, CGeometry *geometry, bool surf_sol)
Deallocate temporary memory needed for merging and writing connectivity in parallel.
void LoadLocalData_IncFlow(CConfig *config, CGeometry *geometry, CSolver **solver, unsigned short val_iZone)
Load the desired solution data into a structure used for parallel reordering and output file writing ...
void SetSurfaceCSV_Adjoint(CConfig *config, CGeometry *geometry, CSolver *AdjSolver, CSolver *FlowSolution, unsigned long iExtIter, unsigned short val_iZone, unsigned short val_iInst)
Create and write the file with the adjoint coefficients on the surface for serial computations.
void SetSU2_MeshASCII(CConfig *config, CGeometry *geometry, unsigned short val_iZone, ofstream &output_file)
Write the nodal coordinates and connectivity to a Tecplot binary mesh file.
void MergeCoordinates_FEM(CConfig *config, CGeometry *geometry)
Merge the node coordinates from all processors for the FEM solver.
bool GetDomain(void)
For parallel computation, its indicates if a point must be computed or not.
su2double GetWall_Distance(void)
Get the value of the distance to the nearest wall.
su2double * GetGridVel(void)
Get the value of the grid velocity at the point.
su2double GetCoord(unsigned short val_dim)
Get the coordinates dor the control volume.
unsigned long GetGlobalIndex(void)
Get the global index in a parallel computation.
su2double GetSharpEdge_Distance(void)
Get the value of the distance to a sharp edge.
virtual unsigned long GetNode(unsigned short val_node)=0
A pure virtual member.
virtual unsigned short GetVTK_Type(void)=0
A pure virtual member.
Main class for defining the PDE solution, it requires a child class for each particular solver (Euler...
virtual su2double GetCPressureTarget(unsigned short val_marker, unsigned long val_vertex)
A virtual member.
unsigned short GetnOutputVariables(void)
Get the number of variables of the problem.
virtual su2double GetVelocity_Inf(unsigned short val_dim)
A virtual member.
virtual su2double GetTotal_Custom_ObjFunc(void)
A virtual member.
virtual void SetTotal_HeatFluxDiff(su2double val_heat)
A virtual member.
virtual su2double GetStrainMag_Max(void)
A virtual member.
virtual su2double GetTotal_Sens_Mach(void)
A virtual member.
virtual void SetTotal_IDC_Mach(su2double val_Total_IDC_Mach)
A virtual member.
virtual su2double GetSurface_CL(unsigned short val_marker)
A virtual member.
virtual su2double GetTotal_Sens_Temp(void)
Set the total farfield temperature sensitivity coefficient.
virtual su2double GetCSkinFriction(unsigned short val_marker, unsigned long val_vertex, unsigned short val_dim)
A virtual member.
virtual su2double GetTotal_CoPx(void)
A virtual member.
virtual su2double GetAllBound_CFz_Inv(void)
A virtual member.
virtual su2double GetYPlus(unsigned short val_marker, unsigned long val_vertex)
A virtual member.
virtual su2double GetTotal_AeroCD(void)
A virtual member.
virtual su2double GetSurface_CFz_Visc(unsigned short val_marker)
A virtual member.
virtual su2double GetRelaxCoeff()
A virtual member.
virtual su2double GetCPressure(unsigned short val_marker, unsigned long val_vertex)
A virtual member.
virtual su2double GetSurface_CL_Inv(unsigned short val_marker)
A virtual member.
virtual su2double GetTotal_AvgTemperature(void)
A virtual member.
su2double GetRes_RMS(unsigned short val_var)
Get the maximal residual, this is useful for the convergence history.
CSysVector LinSysRes
vector to store iterative residual of implicit linear system.
virtual su2double GetTotal_CMz(void)
A virtual member.
virtual su2double GetSurface_CFx_Visc(unsigned short val_marker)
A virtual member.
virtual su2double GetTotal_CMy(void)
A virtual member.
virtual su2double GetTotal_ComboObj(void)
Provide the total "combo" objective (weighted sum of other values).
unsigned long GetPoint_Max(unsigned short val_var)
Get the maximal residual, this is useful for the convergence history.
virtual su2double GetTotal_SolidCD(void)
A virtual member.
virtual su2double GetAllBound_CSF_Mnt(void)
A virtual member.
virtual su2double GetHeatFluxTarget(unsigned short val_marker, unsigned long val_vertex)
A virtual member.
virtual su2double GetSurface_CL_Mnt(unsigned short val_marker)
A virtual member.
virtual su2double GetSurface_CFy(unsigned short val_marker)
A virtual member.
virtual su2double GetAllBound_CEff_Visc(void)
A virtual member.
virtual su2double GetSurface_CD_Inv(unsigned short val_marker)
A virtual member.
virtual su2double GetTotal_CD(void)
A virtual member.
string * OutputHeadingNames
virtual su2double GetSurface_Buffet_Metric(unsigned short val_marker)
A virtual member.
virtual su2double GetAllBound_CFy_Inv(void)
A virtual member.
virtual su2double GetOmega_Inf(void)
A virtual member.
virtual su2double GetTotal_Buffet_Metric(void)
A virtual member.
virtual unsigned long GetnDOFsGlobal(void)
A virtual member.
virtual su2double GetNuTilde_Inf(void)
A virtual member.
virtual su2double GetAllBound_CFx_Visc(void)
A virtual member.
virtual su2double GetAllBound_CMx_Mnt(void)
A virtual member.
virtual su2double GetAllBound_CFz_Mnt(void)
A virtual member.
virtual su2double GetSurface_CMy_Visc(unsigned short val_marker)
A virtual member.
virtual su2double GetAllBound_CD_Inv(void)
A virtual member.
virtual su2double GetTotal_CT(void)
A virtual member.
virtual su2double GetAllBound_CMx_Visc(void)
A virtual member.
virtual su2double GetTotal_CNearFieldOF(void)
A virtual member.
virtual su2double GetAllBound_CFy_Mnt(void)
A virtual member.
virtual su2double GetSurface_CMz_Inv(unsigned short val_marker)
A virtual member.
virtual su2double GetHeatFlux(unsigned short val_marker, unsigned long val_vertex)
A virtual member.
virtual su2double GetTotal_CEquivArea(void)
A virtual member.
virtual su2double GetSurface_CFy_Inv(unsigned short val_marker)
A virtual member.
virtual su2double GetAllBound_CMz_Visc(void)
A virtual member.
virtual su2double GetAllBound_CL_Visc(void)
A virtual member.
virtual su2double GetTotal_CMerit(void)
A virtual member.
virtual void SetTotal_CEquivArea(su2double val_cequivarea)
A virtual member.
virtual su2double GetOmega_Max(void)
A virtual member.
virtual su2double GetTotal_CL(void)
A virtual member.
virtual su2double GetSurface_CFx_Mnt(unsigned short val_marker)
A virtual member.
virtual su2double GetAllBound_CD_Mnt(void)
A virtual member.
virtual su2double GetTotal_Sens_AoA(void)
A virtual member.
virtual su2double GetSurface_CMy_Inv(unsigned short val_marker)
A virtual member.
virtual su2double GetTotal_NetThrust(void)
A virtual member.
unsigned short GetnVar(void)
Get the number of variables of the problem.
su2double * GetPoint_Max_Coord(unsigned short val_var)
Get the location of the maximal residual, this is useful for the convergence history.
virtual su2double GetForceCoeff()
A virtual member.
virtual su2double GetTotal_CFx(void)
A virtual member.
virtual su2double GetTotal_CEff(void)
A virtual member.
virtual su2double GetAllBound_CMy_Inv(void)
A virtual member.
virtual su2double GetTotal_Sens_ModVel(void)
A virtual member.
virtual su2double GetTotal_IDC(void)
A virtual member.
virtual su2double GetAllBound_CFy_Visc(void)
A virtual member.
virtual su2double GetAllBound_CD_Visc(void)
A virtual member.
virtual void SetTotal_DC60(su2double val_Total_DC60)
A virtual member.
virtual su2double GetSurface_CMx_Visc(unsigned short val_marker)
A virtual member.
virtual su2double GetTotal_Sens_Geo(void)
A virtual member.
virtual su2double GetSurface_CFx_Inv(unsigned short val_marker)
A virtual member.
virtual su2double GetAllBound_CFx_Inv(void)
A virtual member.
virtual su2double GetSurface_CMy_Mnt(unsigned short val_marker)
A virtual member.
virtual su2double GetSurface_CMz(unsigned short val_marker)
A virtual member.
virtual su2double GetTotal_HeatFlux(void)
A virtual member.
virtual su2double GetSurface_CSF_Inv(unsigned short val_marker)
A virtual member.
virtual su2double GetTotal_OFRefGeom(void)
A virtual member.
virtual void Evaluate_ObjFunc(CConfig *config)
Compute weighted-sum "combo" objective output.
virtual su2double GetAllBound_CMy_Visc(void)
A virtual member.
virtual su2double GetTotal_CFy(void)
A virtual member.
su2double GetMin_Delta_Time(void)
Get the value of the minimum delta time.
CVariable ** node
Vector which the define the variables for each problem.
virtual su2double GetGlobal_Sens_Nu(unsigned short iVal)
A virtual member.
virtual su2double GetSurface_CSF_Mnt(unsigned short val_marker)
A virtual member.
virtual su2double GetDensity_Inf(void)
A virtual member.
virtual su2double GetTotal_CSF(void)
A virtual member.
virtual su2double GetSurface_CEff_Mnt(unsigned short val_marker)
A virtual member.
virtual su2double GetSurface_CEff_Visc(unsigned short val_marker)
A virtual member.
virtual su2double GetGlobal_Sens_E(unsigned short iVal)
A virtual member.
virtual su2double GetTotal_MaxHeatFlux(void)
A virtual member.
virtual su2double GetTotal_IDR(void)
A virtual member.
virtual su2double GetAllBound_CL_Inv(void)
A virtual member.
virtual CFluidModel * GetFluidModel(void)
Compute the pressure at the infinity.
virtual su2double GetSurface_CFz_Mnt(unsigned short val_marker)
A virtual member.
virtual void SetTotal_ComboObj(su2double ComboObj)
Set the total "combo" objective (weighted sum of other values).
virtual su2double GetTotal_CoPz(void)
A virtual member.
virtual su2double GetTotal_Sens_BPress(void)
Get the total back pressure sensitivity coefficient.
virtual void SetHeatFluxTarget(unsigned short val_marker, unsigned long val_vertex, su2double val_heat)
A virtual member.
virtual su2double GetAllBound_CMz_Mnt(void)
A virtual member.
virtual su2double GetLoad_Increment(void)
A virtual member.
virtual su2double GetTotal_Power(void)
A virtual member.
virtual su2double GetSurface_CMz_Visc(unsigned short val_marker)
A virtual member.
virtual su2double GetSurface_CMx(unsigned short val_marker)
A virtual member.
virtual su2double GetTotal_CMx(void)
A virtual member.
virtual su2double GetTotal_CFEA(void)
A virtual member.
virtual su2double GetAllBound_CFx_Mnt(void)
A virtual member.
virtual su2double GetAllBound_CSF_Visc(void)
A virtual member.
CSysVector OutputVariables
vector to store the extra variables to be written.
virtual su2double GetSurface_CSF(unsigned short val_marker)
A virtual member.
virtual su2double * GetVecSolDOFs(void)
A virtual member.
virtual su2double GetSurface_CFy_Visc(unsigned short val_marker)
A virtual member.
virtual void SetCPressureTarget(unsigned short val_marker, unsigned long val_vertex, su2double val_pressure)
A virtual member.
virtual su2double GetFSI_Residual()
A virtual member.
virtual su2double GetTotal_CoPy(void)
A virtual member.
virtual void SetTotal_IDR(su2double val_Total_IDR)
A virtual member.
su2double GetMax_Delta_Time(void)
Get the value of the maximum delta time.
virtual su2double GetRes_FEM(unsigned short val_var)
Get the residual for FEM structural analysis.
virtual su2double GetSurface_CD_Visc(unsigned short val_marker)
A virtual member.
virtual su2double GetAllBound_CEff_Inv(void)
A virtual member.
virtual su2double GetModVelocity_Inf(void)
A virtual member.
virtual su2double GetAllBound_CEff_Mnt(void)
A virtual member.
virtual su2double GetTotal_CFz(void)
A virtual member.
virtual su2double GetSurface_CFy_Mnt(unsigned short val_marker)
A virtual member.
virtual su2double GetAllBound_CMx_Inv(void)
A virtual member.
virtual su2double GetSurface_CMy(unsigned short val_marker)
A virtual member.
virtual su2double GetSurface_CEff_Inv(unsigned short val_marker)
A virtual member.
virtual su2double GetSurface_CFx(unsigned short val_marker)
A virtual member.
virtual su2double GetCSensitivity(unsigned short val_marker, unsigned long val_vertex)
A virtual member.
virtual su2double GetSurface_CFz_Inv(unsigned short val_marker)
A virtual member.
virtual su2double GetSurface_CSF_Visc(unsigned short val_marker)
A virtual member.
virtual su2double GetSurface_CL_Visc(unsigned short val_marker)
A virtual member.
virtual su2double GetTke_Inf(void)
A virtual member.
virtual su2double GetAllBound_CFz_Visc(void)
A virtual member.
virtual su2double GetTotal_Sens_Press(void)
Set the total farfield pressure sensitivity coefficient.
virtual su2double GetAllBound_CMy_Mnt(void)
A virtual member.
virtual su2double GetSurface_CMx_Inv(unsigned short val_marker)
A virtual member.
virtual su2double GetTotal_Cmu(void)
A virtual member.
virtual su2double GetSurface_CMx_Mnt(unsigned short val_marker)
A virtual member.
virtual su2double GetSurface_CD_Mnt(unsigned short val_marker)
A virtual member.
virtual void SetTotal_CpDiff(su2double val_pressure)
A virtual member.
virtual su2double GetAllBound_CMz_Inv(void)
A virtual member.
virtual void SetTotal_IDC(su2double val_Total_IDC)
A virtual member.
virtual su2double GetTotal_OFRefNode(void)
A virtual member.
virtual su2double GetSurface_CMz_Mnt(unsigned short val_marker)
A virtual member.
virtual su2double GetSurface_CFz(unsigned short val_marker)
A virtual member.
virtual su2double GetSurface_CD(unsigned short val_marker)
A virtual member.
virtual su2double GetTotal_CQ(void)
A virtual member.
virtual su2double GetAllBound_CSF_Inv(void)
A virtual member.
virtual su2double GetAllBound_CL_Mnt(void)
A virtual member.
virtual su2double GetSurface_CEff(unsigned short val_marker)
A virtual member.
virtual su2double GetPressure_Inf(void)
A virtual member.
su2double * GetBlock(unsigned long val_ipoint)
Get the value of the residual.
virtual su2double GetTemperature(void)
A virtual member.
virtual su2double GetVonMises_Stress(void)
A virtual member.
virtual su2double GetSolution_Vel(unsigned short val_var)
Get the velocity (Structural Analysis).
virtual su2double GetLimiter_Primitive(unsigned short val_var)
A virtual member.
su2double GetSensor(void)
Get the pressure sensor.
virtual su2double GetSoundSpeed(void)
A virtual member.
virtual su2double GetSensitivityTranspiration(void)
Get the transpiration velocity Sensitivity at the node.
void SetSolution(su2double *val_solution)
Set the value of the solution.
virtual su2double GetGammaBC(void)
A virtual member.
virtual su2double GetVelocity(unsigned short val_dim)
A virtual member.
virtual su2double GetDensity(void)
A virtual member.
virtual su2double GetEnthalpy(void)
A virtual member.
virtual su2double GetEddyViscosity(void)
A virtual member.
su2double GetSolution(unsigned short val_var)
Get the solution.
su2double * GetLimiter(void)
Get the value of the slope limiter.
virtual su2double GetVelocity2(void)
A virtual member.
virtual su2double GetDES_LengthScale(void)
A virtual member.
virtual su2double GetSpecificHeatCp(void)
A virtual member.
virtual su2double GetGeometry_CrossTerm_Derivative(unsigned short val_var)
A virtual member. Get the geometry solution.
virtual su2double GetRoe_Dissipation(void)
A virtual member.
virtual su2double GetPressure(void)
A virtual member.
virtual su2double GetSensitivity(unsigned short iDim)
Get the Sensitivity at the node.
virtual su2double GetSpecificHeatCv(void)
A virtual member.
virtual su2double * GetStress_FEM(void)
A virtual member.
virtual su2double GetLaminarViscosity(void)
A virtual member.
su2double GetSolution_Old(unsigned short val_var)
Get the old solution of the problem (Runge-Kutta method)
virtual su2double GetSolution_Accel(unsigned short val_var)
Get the acceleration (Structural Analysis).
void GetNormal(su2double *val_normal)
Copy the the normal vector of a face.
short GetRotation_Type(void)
Get the type of rotation associated to the vertex.
unsigned long GetNode(void)
Get the node of the vertex.
Class to store a volume element for the FEM solver.
unsigned long offsetDOFsSolLocal
Local offset of the solution DOFs of this element.
unsigned short indStandardElement
Index in the vector of standard elements.
vector< su2double > coorSolDOFs
The coordinates of the solution DOFs of this element.
unsigned long offsetDOFsSolGlobal
Global offset of the solution DOFs of this element.
unsigned short nDOFsSol
Number of DOFs for the solution of the element.
codi::RealForward su2double
CBaseMPIWrapper::Status * MPI_STATUS_IGNORE
#define MPI_UNSIGNED_LONG
#define MPI_UNSIGNED_SHORT
double GetValue(const su2double &data)
Get the (primitive) value of the datatype (needs to be implemented for each new type).
short Short(const su2double &data)
Casts the primitive value to short (uses GetValue, already implemented for each type).
int Int(const su2double &data)
Casts the primitive value to int (uses GetValue, already implemented for each type).
double GetDerivative(const su2double &data)
Get the derivative value of the datatype (needs to be implemented for each new type).
const int MASTER_NODE
Master node for MPI parallelization.
const su2double PI_NUMBER
Pi number.
@ NO_HYBRIDRANSLES
No turbulence model.
@ NO
Boolean definition of no.
@ YES
Boolean definition of yes.
@ SU2_DEF
Running the SU2_DEF software.
@ SU2_DOT
Running the SU2_DOT software.
@ D_AOA
Derivative with respect to the angle of attack.
@ D_TEMPERATURE
Derivative with respect to the freestream temperature.
@ D_PRESSURE
Derivative with respect to the freestream pressure.
@ D_MACH
Derivative with respect to the mach number.
@ PARAVIEW_BINARY
Paraview binary format for the solution output.
@ FIELDVIEW
FieldView format for the solution output.
@ TECPLOT_BINARY
Tecplot binary format for the solution output.
@ TECPLOT
Tecplot format for the solution output.
@ FIELDVIEW_BINARY
FieldView binary format for the solution output.
@ PARAVIEW
Paraview ASCII format for the solution output.
@ DYNAMIC
Use a time stepping strategy for dynamic computations.
const su2double EPS
Error scale.
const int FLOW_SOL
Position of the mean flow solution in the solver container array.
const unsigned short N_POINTS_LINE
General output & CGNS defines.
const unsigned short N_POINTS_QUADRILATERAL
General output & CGNS defines.
@ SPACE_UPWIND
Upwind convective numerical method.
@ SPACE_CENTERED
Space centered convective numerical method.
const unsigned int INST_0
Definition of the first instance per grid level.
const unsigned short N_POINTS_PYRAMID
General output & CGNS defines.
@ CONSTANT_CONDUCTIVITY
_____.
@ LARGE_DEFORMATIONS
Definition of Neo-Hookean material.
@ SMALL_DEFORMATIONS
Definition of linear elastic material.
@ INCOMPRESSIBLE
Definition of incompressible solver.
@ COMPRESSIBLE
Definition of compressible solver.
@ NACELLE
Nacelle analysis.
@ FUSELAGE
Fuselage analysis.
const unsigned int MESH_0
Definition of the finest grid level.
@ BUFFET_SENSOR
Sensor for detecting separation.
@ REFERENCE_GEOMETRY
Norm of displacements with respect to target geometry.
@ REFERENCE_NODE
Objective function defined as the difference of a particular node respect to a reference position.
@ TRIANGLE
VTK nomenclature for defining a triangle element.
@ PYRAMID
VTK nomenclature for defining a pyramid element.
@ PRISM
VTK nomenclature for defining a prism element.
@ QUADRILATERAL
VTK nomenclature for defining a quadrilateral element.
@ HEXAHEDRON
VTK nomenclature for defining a hexahedron element.
@ LINE
VTK nomenclature for defining a line element.
@ TETRAHEDRON
VTK nomenclature for defining a tetrahedron element.
const int ADJFLOW_SOL
Position of the continuous adjoint flow solution in the solver container array.
@ HARMONIC_BALANCE
Use a harmonic balance source term.
@ DT_STEPPING_1ST
Use a dual time stepping strategy for unsteady computations (1st order).
@ TIME_STEPPING
Use a time stepping strategy for unsteady computations.
@ DT_STEPPING_2ND
Use a dual time stepping strategy for unsteady computations (2nd order).
const int TURB_SOL
Position of the turbulence model solution in the solver container array.
@ HEAT_EQUATION_FVM
Definition of the finite volume heat solver.
@ FEM_NAVIER_STOKES
Definition of the finite element Navier-Stokes' solver.
@ RANS
Definition of the Reynolds-averaged Navier-Stokes' (RANS) solver.
@ NAVIER_STOKES
Definition of the Navier-Stokes' solver.
@ ADJ_NAVIER_STOKES
Definition of the continuous adjoint Navier-Stokes' solver.
@ ADJ_EULER
Definition of the continuous adjoint Euler's solver.
@ FEM_RANS
Definition of the finite element Reynolds-averaged Navier-Stokes' (RANS) solver.
@ ADJ_RANS
Definition of the continuous adjoint Reynolds-averaged Navier-Stokes' (RANS) solver.
@ FEM_EULER
Definition of the finite element Euler's solver.
@ EULER
Definition of the Euler's solver.
@ FEM_LES
Definition of the finite element Large Eddy Simulation Navier-Stokes' (LES) solver.
@ FEM_ELASTICITY
Definition of a FEM solver.
@ NO_ROELOWDISS
No Roe Low Dissipation model.
@ CONSTANT_VISCOSITY
_____.
const int FEA_SOL
Position of the FEA equation in the solution solver array.
@ AVERAGE_MASSFLUX
Mass-flux weighted average.
@ AVERAGE_AREA
Area-weighted average.
@ RESFEM_ABSOLUTE
Absolute criteria: abs(Res).
@ RESFEM_RELATIVE
Relative criteria: Res/Res0.
const unsigned short N_POINTS_HEXAHEDRON
General output & CGNS defines.
const unsigned short N_POINTS_TETRAHEDRON
General output & CGNS defines.
const int SINGLE_NODE
There is only a node in the MPI parallelization.
const int CGNS_STRING_SIZE
Length of strings used in the CGNS format.
const unsigned short N_POINTS_TRIANGLE
General output & CGNS defines.
@ EULER_WALL
Boundary Euler wall definition.
@ ISOTHERMAL
No slip isothermal wall boundary condition.
@ TRANSPIRATION
Transpiration definition.
@ SEND_RECEIVE
Boundary send-receive definition.
@ INLET_FLOW
Boundary inlet flow definition.
@ HEAT_FLUX
No slip constant heat flux wall boundary condition.
@ NEARFIELD_BOUNDARY
Near-Field boundary definition.
const unsigned int ZONE_0
Definition of the first grid domain.
@ FREESTREAM_PRESS_EQ_ONE
Non-dimensional compressible simulation with freestream pressure equal to 1.0.
@ DIMENSIONAL
Dimensional simulation (compressible or incompressible).
@ FREESTREAM_VEL_EQ_MACH
Non-dimensional compressible simulation with freestream velocity equal to Mach number.
@ INITIAL_VALUES
Non-dimensional incompressible simulation based on intial values for external flow.
@ REFERENCE_VALUES
Non-dimensional incompressible simulation based on custom reference values.
@ FREESTREAM_VEL_EQ_ONE
Non-dimensional compressible simulation with freestream pressure equal to 1.0.
const unsigned int MAX_STRING_SIZE
Maximum number of domains.
const int ADJFEA_SOL
Position of the FEA adjoint equation in the solution solver array.
const int ADJTURB_SOL
Position of the continuous adjoint turbulence solution in the solver container array.
const int TRANS_SOL
Position of the transition model solution in the solver container array.
@ SA_COMP
Kind of Turbulent model (Spalart-Allmaras Compressibility Correction).
@ SA_E
Kind of Turbulent model (Spalart-Allmaras Edwards).
@ SA_E_COMP
Kind of Turbulent model (Spalart-Allmaras Edwards with Compressibility Correction).
@ SST
Kind of Turbulence model (Menter SST).
@ SA_NEG
Kind of Turbulent model (Spalart-Allmaras).
@ SA
Kind of Turbulent model (Spalart-Allmaras).
const unsigned short N_POINTS_PRISM
General output & CGNS defines.
@ IMPLICIT_LES
Implicit LES, i.e. no explicit SGS model.
@ BC
Kind of transition model (BAS-CAKMAKCIOGLU (BC) for Spalart-Allmaras).
@ LM
Kind of transition model (LM for Spalart-Allmaras).
const int HEAT_SOL
Position of the heat equation in the solution solver array.
@ US
Definition of incompressible solver.
@ SI
Definition of compressible solver.